This commit is contained in:
Philipp Kunz 2022-02-27 20:19:06 +00:00
parent c579f0d87f
commit 35e4f129df
6 changed files with 13 additions and 10 deletions

14
package-lock.json generated
View File

@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"@pushrocks/smartdelay": "^2.0.13", "@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartnetwork": "^2.0.14", "@pushrocks/smartnetwork": "^2.0.14",
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartrequest": "^1.1.56", "@pushrocks/smartrequest": "^1.1.56",
"@pushrocks/taskbuffer": "^2.1.17" "@pushrocks/taskbuffer": "^2.1.17"
}, },
@ -2794,10 +2795,9 @@
} }
}, },
"node_modules/@pushrocks/smartpromise": { "node_modules/@pushrocks/smartpromise": {
"version": "3.1.6", "version": "3.1.7",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.6.tgz", "resolved": "https://registry.npmjs.org/@pushrocks/smartpromise/-/smartpromise-3.1.7.tgz",
"integrity": "sha512-v+RyVpspzYuBcV/aWXqwC03TWYeFLj7aWMG3IBDFmH2ssgug+82KLW/gw2WB2aVOEvmSkfI9OVvOQz2OsLbYlA==", "integrity": "sha512-2gLQCeviEJwZ+cHHtK2Ks98brZatGC6dPXKIs1tVgJsiNgRFjnp90fESuJ1Pmoe7RrS+7J3mO4NtsFHAJJ/y5w=="
"license": "MIT"
}, },
"node_modules/@pushrocks/smartpuppeteer": { "node_modules/@pushrocks/smartpuppeteer": {
"version": "1.0.36", "version": "1.0.36",
@ -17854,9 +17854,9 @@
} }
}, },
"@pushrocks/smartpromise": { "@pushrocks/smartpromise": {
"version": "3.1.6", "version": "3.1.7",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.6.tgz", "resolved": "https://registry.npmjs.org/@pushrocks/smartpromise/-/smartpromise-3.1.7.tgz",
"integrity": "sha512-v+RyVpspzYuBcV/aWXqwC03TWYeFLj7aWMG3IBDFmH2ssgug+82KLW/gw2WB2aVOEvmSkfI9OVvOQz2OsLbYlA==" "integrity": "sha512-2gLQCeviEJwZ+cHHtK2Ks98brZatGC6dPXKIs1tVgJsiNgRFjnp90fESuJ1Pmoe7RrS+7J3mO4NtsFHAJJ/y5w=="
}, },
"@pushrocks/smartpuppeteer": { "@pushrocks/smartpuppeteer": {
"version": "1.0.36", "version": "1.0.36",

View File

@ -39,6 +39,7 @@
"dependencies": { "dependencies": {
"@pushrocks/smartdelay": "^2.0.13", "@pushrocks/smartdelay": "^2.0.13",
"@pushrocks/smartnetwork": "^2.0.14", "@pushrocks/smartnetwork": "^2.0.14",
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartrequest": "^1.1.56", "@pushrocks/smartrequest": "^1.1.56",
"@pushrocks/taskbuffer": "^2.1.17" "@pushrocks/taskbuffer": "^2.1.17"
} }

View File

@ -15,8 +15,8 @@ export class Bobcat {
public static async createFromNetworkAddress (networkAddressArg: string) { public static async createFromNetworkAddress (networkAddressArg: string) {
const newBobcat = new Bobcat(networkAddressArg); const newBobcat = new Bobcat(networkAddressArg);
try { try {
await newBobcat.checkMinerStatus(); await plugins.smartpromise.timeoutAndContinue(newBobcat.checkMinerStatus());
await newBobcat.gatherMinerDetails(); await plugins.smartpromise.timeoutAndContinue(newBobcat.gatherMinerDetails());
} catch (err) { } catch (err) {
console.log('initial adding completed with errors'); console.log('initial adding completed with errors');
} }

View File

@ -45,7 +45,7 @@ export class BobcatManager {
await plugins.smartdelay.delayFor(10000); await plugins.smartdelay.delayFor(10000);
for (const bobcat of this.bobcats) { for (const bobcat of this.bobcats) {
console.log(`now running maintenance on ${bobcat.latestMinerDetails.animal} at ${bobcat.networkAddress}`); console.log(`now running maintenance on ${bobcat.latestMinerDetails.animal} at ${bobcat.networkAddress}`);
await bobcat.runMaintenance(); await plugins.smartpromise.timeoutAndContinue(bobcat.runMaintenance());
} }
}; };

View File

@ -1,11 +1,13 @@
import * as smartdelay from '@pushrocks/smartdelay'; import * as smartdelay from '@pushrocks/smartdelay';
import * as smartnetwork from '@pushrocks/smartnetwork'; import * as smartnetwork from '@pushrocks/smartnetwork';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartrequest from '@pushrocks/smartrequest'; import * as smartrequest from '@pushrocks/smartrequest';
import * as taskbuffer from '@pushrocks/taskbuffer'; import * as taskbuffer from '@pushrocks/taskbuffer';
export { export {
smartdelay, smartdelay,
smartnetwork, smartnetwork,
smartpromise,
smartrequest, smartrequest,
taskbuffer, taskbuffer,
} }