4 Commits

Author SHA1 Message Date
a9ff2e2ddc 1.0.23 2022-02-28 18:11:02 +01:00
812a43449d fix(core): update 2022-02-28 18:11:01 +01:00
806de97d22 1.0.22 2022-02-27 23:23:52 +01:00
5ab8115b34 fix(core): update 2022-02-27 23:23:51 +01:00
4 changed files with 13 additions and 3 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@mojoio/bobcat", "name": "@mojoio/bobcat",
"version": "1.0.21", "version": "1.0.23",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@mojoio/bobcat", "name": "@mojoio/bobcat",
"version": "1.0.21", "version": "1.0.23",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@pushrocks/smartdelay": "^2.0.13", "@pushrocks/smartdelay": "^2.0.13",

View File

@ -1,6 +1,6 @@
{ {
"name": "@mojoio/bobcat", "name": "@mojoio/bobcat",
"version": "1.0.21", "version": "1.0.23",
"private": false, "private": false,
"description": "a module to talk to bobcat miners", "description": "a module to talk to bobcat miners",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -68,6 +68,7 @@ export class Bobcat {
await plugins.smartpromise.timeoutAndContinue(this.checkMinerStatus()); await plugins.smartpromise.timeoutAndContinue(this.checkMinerStatus());
await plugins.smartdelay.delayFor(10000); await plugins.smartdelay.delayFor(10000);
await plugins.smartpromise.timeoutAndContinue(this.gatherMinerDetails()); await plugins.smartpromise.timeoutAndContinue(this.gatherMinerDetails());
await plugins.smartdelay.delayFor(10000);
if (this.latestStatus.status === 'Synced' && parseInt(this.latestStatus.gap) > -100 && parseInt(this.latestStatus.gap) < 50) { if (this.latestStatus.status === 'Synced' && parseInt(this.latestStatus.gap) > -100 && parseInt(this.latestStatus.gap) < 50) {
console.log(`Miner ${this.latestMinerDetails.animal} at ${this.networkAddress} is Synced. ok!`) console.log(`Miner ${this.latestMinerDetails.animal} at ${this.networkAddress} is Synced. ok!`)
return; return;

View File

@ -24,6 +24,15 @@ export class BobcatManager {
await this.runMaintenance(); await this.runMaintenance();
} }
}), '0 0 * * * *'); }), '0 0 * * * *');
this.taskmanager.addAndScheduleTask(new plugins.taskbuffer.Task({
name: 'contStatus',
taskFunction: async () => {
this.actionStore.push();
for (const bobcat of this.bobcats) {
bobcat.checkMinerStatus();
};
}
}), '0 * * * * *');
} }
/** /**