Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrading to latest version 0.6.0 a JobRepeatException is thrown #22

Open
hakan0xFF opened this issue May 21, 2019 · 3 comments
Open
Labels
enhancement New feature or request question Further information is requested

Comments

@hakan0xFF
Copy link

hakan0xFF commented May 21, 2019

Hey,

after upgrading to the latest version 0.6.0 I get the following exception:

(node:82651) UnhandledPromiseRejectionWarning: #<JobRepeatException>
(node:82651) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:82651) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I'm using the @Cron decorator. Where do I have to set the key or do I have to set the key at all?

Thanks for your help.

@miaowing
Copy link
Owner

miaowing commented May 21, 2019

I think you have another job with the same key maybe, it should be global unique(The default key is function name if you not specific it),
You should set a key when schedule a job such as @Cron('', {key: 'test-key'}) now.
I will try use class name as namespace to resolve it in the future version, thanks

@miaowing miaowing added enhancement New feature or request question Further information is requested labels May 21, 2019
@hakan0xFF
Copy link
Author

Thanks for your prompt reply. It solved my issue.

First I checked the readme if I can set the key using the decorator and did not pay enough attention that ICronJobConfig actually extends IJobConfig. Maybe you could update the readme (section @Cron decorator).

@miaowing
Copy link
Owner

Thanks for your prompt reply. It solved my issue.

First I checked the readme if I can set the key using the decorator and did not pay enough attention that ICronJobConfig actually extends IJobConfig. Maybe you could update the readme (section @Cron decorator).

I will update readme soon, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants