mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix WorkerService implementation
This commit is contained in:
1 parent
4356f17ef8
commit
10bad169cf
1 file changed
+2
@@ -60,6 +60,8 @@ class Consumer {
|
|||||||
|
|
||||||
class WorkerService implements BaseService {
|
class WorkerService implements BaseService {
|
||||||
private handlers: Record<string, Function> = {};
|
private handlers: Record<string, Function> = {};
|
||||||
|
public started = true;
|
||||||
|
public start = () => { };
|
||||||
public consumer = new Consumer(
|
public consumer = new Consumer(
|
||||||
{ type: 'schedule', subType: { $in: Object.keys(this.handlers) } },
|
{ type: 'schedule', subType: { $in: Object.keys(this.handlers) } },
|
||||||
async (doc) => {
|
async (doc) => {
|
||||||
|
|||||||
Reference in new issue
Block a user