refactor: add block cron to node client, but ensure it only runs on boot
This commit is contained in:
parent
fbfb9c1e06
commit
11367b9803
|
@ -25,4 +25,14 @@ export default class Client extends BaseClient {
|
|||
this.beaconUrl = config.beaconUrl;
|
||||
this.http.defaults.baseURL = this.beaconUrl;
|
||||
}
|
||||
|
||||
async sync(): Promise<void> {
|
||||
await super.sync();
|
||||
|
||||
if (!this.booted) {
|
||||
this.subscribe();
|
||||
|
||||
this.booted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue