24 lines
609 B
TypeScript
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();
|
|
}
|
|
};
|
|
} |