0.5.7 • Published 10 years ago

worker_js v0.5.7

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
10 years ago

worker_js

WorkerJs - JavaScript client for worker_js The ultimate, language agnostic, container based task processing framework. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.5.7
  • Package version: 0.5.7
  • Build date: 2016-08-24T18:32:28.763Z
  • Build package: class io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install worker_js --save

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/worker_js then install it via:

    npm install YOUR_USERNAME/worker_js --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

var WorkerJs = require('worker_js');

var api = new WorkerJs.GroupsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.groupsGet(callback);

Documentation for API Endpoints

All URIs are relative to https://localhost:8080/v1

ClassMethodHTTP requestDescription
WorkerJs.GroupsApigroupsGetGET /groupsGet all group names.
WorkerJs.GroupsApigroupsNameGetGET /groups/{name}Get information for a group.
WorkerJs.GroupsApigroupsNamePutPUT /groups/{name}Create/update a task group.
WorkerJs.GroupsApigroupsPostPOST /groupsPost new group
WorkerJs.RunnerApigroupsNameTasksIdErrorPostPOST /groups/{name}/tasks/{id}/errorMark task as failed.
WorkerJs.RunnerApigroupsNameTasksIdStartPostPOST /groups/{name}/tasks/{id}/startMark task as started, ie: status = 'running'
WorkerJs.RunnerApigroupsNameTasksIdSuccessPostPOST /groups/{name}/tasks/{id}/successMark task as succeeded.
WorkerJs.TasksApigroupsNameTasksGetGET /groups/{name}/tasksGet task list by group name.
WorkerJs.TasksApigroupsNameTasksIdCancelPostPOST /groups/{name}/tasks/{id}/cancelCancel a task.
WorkerJs.TasksApigroupsNameTasksIdDeleteDELETE /groups/{name}/tasks/{id}Delete the task.
WorkerJs.TasksApigroupsNameTasksIdErrorPostPOST /groups/{name}/tasks/{id}/errorMark task as failed.
WorkerJs.TasksApigroupsNameTasksIdGetGET /groups/{name}/tasks/{id}Gets task by id
WorkerJs.TasksApigroupsNameTasksIdLogGetGET /groups/{name}/tasks/{id}/logGet the log of a completed task.
WorkerJs.TasksApigroupsNameTasksIdLogPostPOST /groups/{name}/tasks/{id}/logSend in a log for storage.
WorkerJs.TasksApigroupsNameTasksIdRetryPostPOST /groups/{name}/tasks/{id}/retryRetry a task.
WorkerJs.TasksApigroupsNameTasksIdStartPostPOST /groups/{name}/tasks/{id}/startMark task as started, ie: status = 'running'
WorkerJs.TasksApigroupsNameTasksIdSuccessPostPOST /groups/{name}/tasks/{id}/successMark task as succeeded.
WorkerJs.TasksApigroupsNameTasksIdTouchPostPOST /groups/{name}/tasks/{id}/touchExtend task timeout.
WorkerJs.TasksApigroupsNameTasksPostPOST /groups/{name}/tasksEnqueue task
WorkerJs.TasksApitasksGetGET /tasksGet next task.

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

0.5.7

10 years ago

0.5.5

10 years ago

0.5.3

10 years ago

0.5.2

10 years ago