bobcat/ts/bobcat.classes.bobcatmanager.ts

24 lines
609 B
TypeScript
Raw Normal View History

2022-02-24 19:16:21 +00:00
import * as plugins from './bobcat.plugins';
2022-02-25 19:36:44 +00:00
import { Bobcat } from './bobcat.classes.bobcat';
2022-02-24 19:16:21 +00:00
/**
*
*/
export class BobcatManager {
2022-02-25 19:36:44 +00:00
public bobcats: Bobcat[] = [];
public async addBobcat(networkAddressArg: string) {
const newBobcat = await Bobcat.createFromNetworkAddress(networkAddressArg);
this.bobcats.push(newBobcat);
}
2022-02-25 20:33:24 +00:00
/**
* 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();
}
};
2022-02-24 19:16:21 +00:00
}