topliceanu / schedule-drone

A reliable, fault-tolerant, persistent event scheduler for node.js
5 stars 4 forks source link

One-time events not being "done" when using PersistentScheduler #5

Closed JvrBaena closed 10 years ago

JvrBaena commented 10 years ago

Hi.

I have been tinkering with schedule-drone using mongo as persistence layer. I have found that, when using one-time events with a persistence layer, the events where not being marked as "done" in mongo once processed. In fact, if they are one-time events, maybe they should be completely removed instead of being marked as solved.

I have added a remove method and a call to it in the PersistentScheduler executeOneTimeEvents method. Whether to call remove or call "solve" here could also be a configuration option.

I'm more a javascript guy (no expert in coffeescript) but so far it seems to work. Hope you find it useful and thanks for creating the module!

topliceanu commented 10 years ago

@JvrBaena awesome! thanks a lot. Merged!

JvrBaena commented 10 years ago

Nice! :D