Skip to content

Commit

Permalink
fix(backend): make this available to the cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
dr460nf1r3 committed Nov 2, 2024
1 parent 72e45aa commit 148acf5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/repo-manager/repo-manager.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ export class RepoManagerService {

async init(): Promise<void> {
this.repos = await this.repoRepository.find({ where: { isActive: true, repoUrl: Not(IsNull()) } });

const runWithThis = this.run.bind(this);
this.tasks.push(
new CronJob(
this.configService.get<string>("repoMan.schedulerInterval"),
this.run, // onTick
runWithThis, // onTick
null, // onComplete
true, // start
"Europe/Berlin",
Expand Down

0 comments on commit 148acf5

Please sign in to comment.