Skip to content

Commit

Permalink
feat(): add support for crons in controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Sep 23, 2020
1 parent 7a39db3 commit ecf2c08
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/schedule.explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ export class ScheduleExplorer implements OnModuleInit {
}

explore() {
const providers: InstanceWrapper[] = this.discoveryService.getProviders();
providers.forEach((wrapper: InstanceWrapper) => {
const instanceWrappers: InstanceWrapper[] = [
...this.discoveryService.getControllers(),
...this.discoveryService.getProviders(),
];
instanceWrappers.forEach((wrapper: InstanceWrapper) => {
const { instance } = wrapper;
if (!instance || !Object.getPrototypeOf(instance)) {
return;
Expand Down

0 comments on commit ecf2c08

Please sign in to comment.