worker_js

0.5.7 • Public • Published

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

Class Method HTTP request Description
WorkerJs.GroupsApi groupsGet GET /groups Get all group names.
WorkerJs.GroupsApi groupsNameGet GET /groups/{name} Get information for a group.
WorkerJs.GroupsApi groupsNamePut PUT /groups/{name} Create/update a task group.
WorkerJs.GroupsApi groupsPost POST /groups Post new group
WorkerJs.RunnerApi groupsNameTasksIdErrorPost POST /groups/{name}/tasks/{id}/error Mark task as failed.
WorkerJs.RunnerApi groupsNameTasksIdStartPost POST /groups/{name}/tasks/{id}/start Mark task as started, ie: status = 'running'
WorkerJs.RunnerApi groupsNameTasksIdSuccessPost POST /groups/{name}/tasks/{id}/success Mark task as succeeded.
WorkerJs.TasksApi groupsNameTasksGet GET /groups/{name}/tasks Get task list by group name.
WorkerJs.TasksApi groupsNameTasksIdCancelPost POST /groups/{name}/tasks/{id}/cancel Cancel a task.
WorkerJs.TasksApi groupsNameTasksIdDelete DELETE /groups/{name}/tasks/{id} Delete the task.
WorkerJs.TasksApi groupsNameTasksIdErrorPost POST /groups/{name}/tasks/{id}/error Mark task as failed.
WorkerJs.TasksApi groupsNameTasksIdGet GET /groups/{name}/tasks/{id} Gets task by id
WorkerJs.TasksApi groupsNameTasksIdLogGet GET /groups/{name}/tasks/{id}/log Get the log of a completed task.
WorkerJs.TasksApi groupsNameTasksIdLogPost POST /groups/{name}/tasks/{id}/log Send in a log for storage.
WorkerJs.TasksApi groupsNameTasksIdRetryPost POST /groups/{name}/tasks/{id}/retry Retry a task.
WorkerJs.TasksApi groupsNameTasksIdStartPost POST /groups/{name}/tasks/{id}/start Mark task as started, ie: status = 'running'
WorkerJs.TasksApi groupsNameTasksIdSuccessPost POST /groups/{name}/tasks/{id}/success Mark task as succeeded.
WorkerJs.TasksApi groupsNameTasksIdTouchPost POST /groups/{name}/tasks/{id}/touch Extend task timeout.
WorkerJs.TasksApi groupsNameTasksPost POST /groups/{name}/tasks Enqueue task
WorkerJs.TasksApi tasksGet GET /tasks Get next task.

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

Readme

Keywords

none

Package Sidebar

Install

npm i worker_js

Weekly Downloads

1

Version

0.5.7

License

Apache-2.0

Last publish

Collaborators

  • treeder