breejs / bree

Bree is a Node.js and JavaScript job task scheduler with worker threads, cron, Date, and human syntax. Built for @ladjs, @forwardemail, @spamscanner, @cabinjs.
https://jobscheduler.net
MIT License
3.01k stars 78 forks source link

fix: remove closeWorkerAfterMs after exit or done #131

Closed climba03003 closed 2 years ago

climba03003 commented 2 years ago

Fixes #130

I do a refactor on code about removing the timers on bree. It is a duplicate of code in multiple places. If you do not like it, I can revert it.

codecov-commenter commented 2 years ago

Codecov Report

Merging #131 (beaa61d) into master (769c6bd) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #131   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          397       395    -2     
=========================================
- Hits           397       395    -2     
Impacted Files Coverage Δ
src/index.js 100.00% <100.00%> (ø)

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 769c6bd...beaa61d. Read the comment docs.

shadowgate15 commented 2 years ago

could you move removeSafeTimer inside of class and then bind it in the constructor like we have done with other functions. otherwise looks good to me!

climba03003 commented 2 years ago

could you move removeSafeTimer inside of class and then bind it in the constructor like we have done with other functions. otherwise looks good to me!

@shadowgate15 Updated.

shadowgate15 commented 2 years ago

Thank you @climba03003