Skip to content

Instantly share code, notes, and snippets.

@carimura
Last active December 15, 2015 17:09
Show Gist options
  • Save carimura/5294704 to your computer and use it in GitHub Desktop.
Save carimura/5294704 to your computer and use it in GitHub Desktop.
That should create a task with a timeout of 1 minute.
var worker = require("iron_worker");
var client = new worker.Client({"project_id": "my project ID", "token": "my token"});
client.tasksCreate("myWorker", "payload", {"timeout": 60}, function(error, response) {
// callback for when the task has been posted, with the response
});
@carimura
Copy link
Author

carimura commented Apr 2, 2013

timeout value is in seconds

@carimura
Copy link
Author

carimura commented Apr 2, 2013

small correction: added 'new' in front of worker.Client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment