mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
多worker共享事件(不稳定
This commit is contained in:
1 parent
d59710ddf1
commit
dd5a212422
9 files changed
+113
-20
No files matched your search
@@ -103,7 +103,7 @@ class RecordMainConnectionHandler extends RecordConnectionHandler {
|
||||
return;
|
||||
}
|
||||
}
|
||||
bus.subscribe(['record_change'], this.onRecordChange);
|
||||
bus.subscribe(['record_change'], this, 'onRecordChange');
|
||||
}
|
||||
|
||||
async message(msg) {
|
||||
@@ -118,7 +118,7 @@ class RecordMainConnectionHandler extends RecordConnectionHandler {
|
||||
}
|
||||
|
||||
async cleanup() {
|
||||
bus.unsubscribe(['record_change'], this.onRecordChange);
|
||||
bus.unsubscribe(['record_change'], this, 'onRecordChange');
|
||||
}
|
||||
|
||||
async onRecordChange(data) {
|
||||
@@ -145,7 +145,7 @@ class RecordDetailConnectionHandler extends contest.ContestHandlerMixin(Connecti
|
||||
}
|
||||
}
|
||||
this.rid = rid;
|
||||
bus.subscribe(['record_change'], this.onRecordChange);
|
||||
bus.subscribe(['record_change'], this, 'onRecordChange');
|
||||
this.onRecordChange({ value: rdoc });
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ class RecordDetailConnectionHandler extends contest.ContestHandlerMixin(Connecti
|
||||
}
|
||||
|
||||
async cleanup() {
|
||||
bus.unsubscribe(['record_change'], this.onRecordChange);
|
||||
bus.unsubscribe(['record_change'], this, 'onRecordChange');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user