breejs / bree

Bree is a Node.js and JavaScript job task scheduler with worker threads, cron, Date, and human syntax. Built for @ladjs, @forwardemail, @spamscanner, @cabinjs.
https://jobscheduler.net
MIT License
3.01k stars 78 forks source link

extend configuration to hook worker messages #120

Closed delcon closed 3 years ago

delcon commented 3 years ago

I find logging and monitoring subpar because of the fixed message templates. How about extending the configuration object to be able to hook into messages from worker threads?

config:

{
    name : "foo",
    interval: "2min",
    onMessage: (message) => {  },
    onExit: (info) => { },
    .....
}

If you are interested I could write a pull request.

Also I would like to be able to mute the logger with logger: null

shadowgate15 commented 3 years ago

There is already this option.