Files
outline/__mocks__/bull.js
Tom Moor 1b7fe0f7da flow
2020-11-27 09:48:10 -08:00

19 lines
358 B
JavaScript

/* eslint-disable flowtype/require-valid-file-annotation */
export default class Queue {
name;
constructor(name) {
this.name = name;
}
process = (fn) => {
console.log(`Registered function ${this.name}`);
this.processFn = fn;
};
add = (data) => {
console.log(`Running ${this.name}`);
return this.processFn({ data });
};
}