Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #726 from jshayes/add-warning-logs
feat(@nestjs/scheduler): Add a warning when using non static providers
- Loading branch information
Showing
8 changed files
with
253 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Injectable, Scope } from '@nestjs/common'; | ||
import { Cron } from '../../lib/decorators'; | ||
import { CronExpression } from '../../lib/enums'; | ||
|
||
@Injectable({ scope: Scope.REQUEST }) | ||
export class RequestScopedCronService { | ||
@Cron(CronExpression.EVERY_MINUTE) | ||
handleCron() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Injectable, Scope } from '@nestjs/common'; | ||
import { Interval } from '../../lib/decorators'; | ||
|
||
@Injectable({ scope: Scope.REQUEST }) | ||
export class RequestScopedIntervalService { | ||
@Interval('test', 2500) | ||
handleInterval() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Injectable, Scope } from '@nestjs/common'; | ||
import { Timeout } from '../../lib/decorators'; | ||
|
||
@Injectable({ scope: Scope.REQUEST }) | ||
export class RequestScopedTimeoutService { | ||
@Timeout('test', 2500) | ||
handleTimeout() {} | ||
} |