Module: taskManager

Welcome to taskManager.js
Author:
  • Kier Lindsay sgo.life This is met to work with child processes and simplify working with them designed for ffmpeg video processing tasks
Source:
Example
var taskManager = require('./path/to/taskmanager.js')

 let task = taskManager.spawnTask('echo World', {
        parseProgress: (task, data) => {
            return parseInt(data); //todo actually figure out the progress made
        },
        args: ['42']
    },
 (tid, data, done) => {
        console.log('Hello ', data);
        if (done) {
            console.log('Woo Done');
            //todo start the next step or notify something
        }
    });

 app.get('/demoStatus', (req, res) => {
    taskManager.getStatus(0,)
})

Classes

TaskManager