[fix] Bree not working with Later
Sja91 opened this issue · comments
Sja91 commented
Node.js version: 18.17.1
OS version: Ubuntu 20.04 and Windows 10
Description: Attempting to use Later to create a complex schedule for Bree, but does not work with even a basic example.
Actual behavior
Attempting to run code results in error.
node:internal/per_context/domexception:53
ErrorCaptureStackTrace(this);
^
DOMException [DataCloneError]: function() {
values = arguments[0] instanceof Array ? arguments[0] : arguments;
return this;
} could not be cloned.
Expected behavior
Should see an output every 1 second.
Code to reproduce
const Bree = require('bree');
const Later = require('later');
const b = new Bree({
root: false,
jobs: [
{
name: 'job with function',
path: () => { console.log('qwerty') },
interval: Later.parse.recur().every(1).second()
}
]
});
b.start();
Checklist
- I have searched through GitHub issues for similar issues.
- I have completely read through the README and documentation.
- I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.