wechaty / puppet-whatsapp

Wechaty Puppet for Whatsapp
https://npmjs.com/package/wechaty-puppet-whatsapp
Apache License 2.0
24 stars 17 forks source link

It is not a good idea for using node-schedule in a Puppet implementation. #327

Open su-chang opened 2 years ago

su-chang commented 2 years ago

See detail here: https://github.com/wechaty/puppet-whatsapp/pull/322#discussion_r815619510

hcfw007 commented 2 years ago

If node-schedule package has no known issue, i think it's fine to use this package.

I mean there's no need to create a new wheel if the existing one is just fine, and there will possibly be more scheduled jobs in the future that could use node-schedule like clearing cache.

huan commented 2 years ago

After I quickly reviewed the code I can not see any necessity to use this pattern.

It only adds up the complexity and can be simply replaced by setTimeout with a few lines of code I think.

However, I'm ok if both of you feel better by using node-schedule.