refactor: add block cron to node client, but ensure it only runs on boot

This commit is contained in:
Derrick Hammer 2023-07-15 00:21:24 -04:00
parent fbfb9c1e06
commit 11367b9803
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 10 additions and 0 deletions

View File

@ -25,4 +25,14 @@ export default class Client extends BaseClient {
this.beaconUrl = config.beaconUrl; this.beaconUrl = config.beaconUrl;
this.http.defaults.baseURL = this.beaconUrl; this.http.defaults.baseURL = this.beaconUrl;
} }
async sync(): Promise<void> {
await super.sync();
if (!this.booted) {
this.subscribe();
this.booted = true;
}
}
} }