bobcat/ts/bobcat.classes.bobcatmanager.ts
2022-02-25 21:33:24 +01:00

24 lines
609 B
TypeScript

import * as plugins from './bobcat.plugins';
import { Bobcat } from './bobcat.classes.bobcat';
/**
*
*/
export class BobcatManager {
public bobcats: Bobcat[] = [];
public async addBobcat(networkAddressArg: string) {
const newBobcat = await Bobcat.createFromNetworkAddress(networkAddressArg);
this.bobcats.push(newBobcat);
}
/**
* runs the maintenance on all managed bobcats
*/
public async runMaintenance() {
console.log(`now running maintenance on ${this.bobcats.length} bobcats!`);
for (const bobcat of this.bobcats) {
await bobcat.runMaintenance();
}
};
}