@tduniec/backstage-plugin-time-saver-backend
Version:
This plugin provides an implementation of charts and statistics related to your time savings that are coming from usage of your templates. Plugins is built from frontend and backend part. Backend plugin is responsible for scheduled stats parsing process a
36 lines (32 loc) • 834 B
JavaScript
;
var handler = require('./handler.cjs.js');
class TsScheduler {
constructor(logger, config, auth, db) {
this.logger = logger;
this.config = config;
this.auth = auth;
this.db = db;
}
async schedule(taskRunner) {
const tsHandler = new handler.TimeSaverHandler(
this.logger,
this.config,
this.auth,
this.db
);
await taskRunner.run({
id: "collect-templates-time-savings",
fn: async () => {
this.logger.info(
"START - Scheduler executed - fetching templates for TS plugin"
);
await tsHandler.fetchTemplates();
this.logger.info(
"STOP - Scheduler executed - fetching templates for TS plugin"
);
}
});
}
}
exports.TsScheduler = TsScheduler;
//# sourceMappingURL=scheduler.cjs.js.map