Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bump version to 0.1.3
  • Loading branch information
sunloverz committed Dec 26, 2014
1 parent 1fa1c94 commit f78ec90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions README.md
Expand Up @@ -70,27 +70,25 @@ If you need to pass some data you can use payload parameter

```javascript
var payload = {first: 'Hello', second: 'World'};
var task_id = worker.tasksCreate('HelloWorld', payload);
var options = {priority: 1};
worker.tasksCreate('HelloWorld', payload, options, function(error, body) {});
```

### Queueing Options

```javascript
var payload = {first: 'Hello', second: 'World'};
var options = {priority: 1};
var task_id = worker.tasksCreate('HelloWorld', payload, priority);
```

- **priority**: Setting the priority of your job. Valid values are 0, 1, and 2. The default is 0.
- **timeout**: The maximum runtime of your task in seconds. No task can exceed 3600 seconds (60 minutes). The default is 3600 but can be set to a shorter duration.
- **delay**: The number of seconds to delay before actually queuing the task. Default is 0.
- **label**: Optional text label for your task.
- **cluster**: cluster name ex: "high-mem" or "dedicated". This is a premium feature for customers to have access to more powerful or custom built worker solutions. Dedicated worker clusters exist for users who want to reserve a set number of workers just for their queued tasks. If not set default is set to "default" which is the public IronWorker cluster.


## Status of a Worker
To get the status of a worker, you can use the ```tasksGet()``` method.

```javascript
var task_id = worker.tasksCreate('HelloWorld');
details = worker.tasksGet(task_id);
worker.tasksGet(task_id, function(error, body) {});
```

## Get Worker Log
Expand All @@ -109,7 +107,7 @@ worker.tasksWaitFor(task_id, function (err, res) {
Like with `tasksCreate`

```javascript
var task_id = worker.schedulesCreate('HelloWorld', payload, {run_times: 10});
worker.schedulesCreate('HelloWorld', payload, {run_times: 10}, function(error, body) {});
```

### Scheduling Options
Expand All @@ -119,6 +117,9 @@ var task_id = worker.schedulesCreate('HelloWorld', payload, {run_times: 10});
- **run_times**: The number of times a task will run.
- **priority**: Setting the priority of your job. Valid values are 0, 1, and 2. The default is 0. Higher values means tasks spend less time in the queue once they come off the schedule.
- **start_at**: The time the scheduled task should first be run.
- **label**: Optional text label for your task.
- **cluster**: cluster name ex: "high-mem" or "dedicated".


# Full Documentation

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "iron_worker",
"version": "0.1.2",
"version": "0.1.3",
"description": "Node client for IronWorker",
"homepage": "https://github.com/iron-io/iron_worker_node",
"author": "Andrew Kirilenko & Iron.io, Inc",
Expand Down

0 comments on commit f78ec90

Please sign in to comment.