fix(core): update
This commit is contained in:
parent
8c01d5cabf
commit
b8eb82de12
@ -50,6 +50,17 @@ export class Bobcat {
|
||||
await this.gatherMinerDetails();
|
||||
if (this.latestStatus.status !== 'Synced') {
|
||||
console.log(`Miner ${this.latestMinerDetails.animal} is not synced. Restarting now!`);
|
||||
await this.restart().catch();
|
||||
}
|
||||
}
|
||||
|
||||
public async restart() {
|
||||
const response = await plugins.smartrequest.request(`http://${this.networkAddress}/admin/reboot`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: 'Basic ' + Buffer.from('bobcat:miner').toString('base64')
|
||||
}
|
||||
});
|
||||
console.log(response.statusCode);
|
||||
}
|
||||
}
|
@ -21,4 +21,8 @@ export class BobcatManager {
|
||||
await bobcat.runMaintenance();
|
||||
}
|
||||
};
|
||||
|
||||
public async restart() {
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user