{"id":18657868,"url":"https://github.com/lightsofapollo/task-runner","last_synced_at":"2025-11-05T22:30:23.059Z","repository":{"id":10806985,"uuid":"13080263","full_name":"lightsofapollo/task-runner","owner":"lightsofapollo","description":"Task runner framework ","archived":false,"fork":false,"pushed_at":"2013-12-03T23:32:45.000Z","size":131,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-27T15:12:41.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightsofapollo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-25T00:34:47.000Z","updated_at":"2019-03-01T23:56:08.000Z","dependencies_parsed_at":"2022-09-01T22:52:02.895Z","dependency_job_id":null,"html_url":"https://github.com/lightsofapollo/task-runner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Ftask-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Ftask-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Ftask-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Ftask-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightsofapollo","download_url":"https://codeload.github.com/lightsofapollo/task-runner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239475960,"owners_count":19645041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T07:30:08.946Z","updated_at":"2025-11-05T22:30:23.027Z","avatar_url":"https://github.com/lightsofapollo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"task-runner\n===========\n\nTask runner framework \n\n## Defining a task\n\nA task is a single isolated module that exports an object with the\nfollowing api:\n\n```js\n// this is the \"mytask\" module\nfunction myTask(options, callback) {\n  // in the case of a non-deterministic error you simply\n  // invoke the callback with one like in all node operations\n  callback(new Error('....'));\n\n  // and in the success case\n  callback(null, outcome, { someData: true });\n}\n\nmodule.exports = myTask;\n```\n\n## Invoking a task\n\n```js\nvar runner = require('isolated-task-runner');\n\nrunner.perform(\n  require.resolve('myask'), /* module to run: use require.resolve to use npm packages */\n  1000, /* timeout in ms */\n  { somedata: true }, /* options to pass to task */\n  function(err, outcome, result) {\n    /* result of task */\n  }\n);\n```\n\nThe callback takes a standard node-style error object, a `boolean` and an\n`Object`.  The error object is a standard node error callback object. The\n`boolean` contains the outcome of the task.  A `true` value means that the\noperation completely succeeded.  A `false` value means that the operation\nfailed and should be retried.  The `Object` contains information relevant\nto status and reporting.  The task running system will not make any choices\nbased on the contents of this `Object`.\n\n## Isolation and error handling\n\n- Your task is run in a totally separate process and has no direct access the\nmemory in the process where it was started.\n\n- Each task may fail (process dies, on the sync exception, off the\nasync exception) and it will be handled gracefully and passed to the\ntask runner.\n\n- Tasks should only generate errors when they fail non-deterministically.\nDeterministic failures should be noted by having an outcome of `false`.\nAn api call that fails because the connection died should generate an\nerror, where trying to comment on a bug that doesn't exist should have\na `false` outcome\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Ftask-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightsofapollo%2Ftask-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Ftask-runner/lists"}