1.0.2 • Published 6 years ago

@pi-team-mn/aws-sf-task-runner v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

aws-sf-task-runner

import { runForever } from './task-runner';

// Your own custom processor
// > input will be already JSON parsed by the task runner
// > the task runner will also JSON stringify you return value
function myProcessor(input) {
    console.log(input);
    return {'your own': 'custom result'};
}

// The task name should be set as an anvironment variable:
process.env.TASK_NAME='your-task-name-is-the-last-part-of-the-activity-arn';

runForever(myProcessor).catch(err => console.error(err));