node-cron icon indicating copy to clipboard operation
node-cron copied to clipboard

Allow soft warning when a hard error isn't required.

Open ncb000gt opened this issue 5 years ago • 5 comments

GH-467 GH-478 GH-469 GH-470 GH-497 GH-498

Signed-off-by: Nick Campbell [email protected]

ncb000gt avatar May 27 '20 02:05 ncb000gt

Codecov Report

Merging #499 into master will decrease coverage by 0.73%. The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
- Coverage   92.35%   91.62%   -0.74%     
==========================================
  Files           3        3              
  Lines         353      358       +5     
  Branches      102      104       +2     
==========================================
+ Hits          326      328       +2     
- Misses         26       28       +2     
- Partials        1        2       +1     
Impacted Files Coverage Δ
lib/time.js 92.00% <33.33%> (-1.22%) :arrow_down:
lib/job.js 91.07% <100.00%> (+0.08%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9a51726...e928c8c. Read the comment docs.

codecov[bot] avatar May 27 '20 02:05 codecov[bot]

any update?

utick avatar Jul 15 '20 03:07 utick

Update?

Bilonik avatar Aug 24 '20 23:08 Bilonik

My hesitation with this PR is that it effectively reverts the change that was made to prevent infinite loops inside the cron tool. Of course this only happens in certain cases, and isn't all the time, but I want to support a better option. I'm thinking of making a change to this that resets the time by which the tool runs. I'll post here when I've settled on the best way to add this. Once I have a solution for this I'll push the code.

ncb000gt avatar Aug 24 '20 23:08 ncb000gt

@ncb000gt FYI it looks like this PR will always make softTimeout === true because of the or pipes (||) here: e928c8c (#499)

In line 58 of lib/job.js in the PR: softTimeout = cronTime.softTimeout || true

If provided initially via an object, the softTimeout option {softTimeout: false} would always be coerced to true based on the above logic, which would then be passed into the CronTime constructor.

aphix avatar Sep 03 '20 21:09 aphix