Closed AlexanderProd closed 5 years ago
Hey AlexanderProd !
I just tried to delete an event stored in DDB and I have not encountered any problem, my event is deleted correctly, of course the others remained intact.
I grant you, the documentation needs to be reviewed to be more explicit ;)
For the deletion to work on a document specifically, the scheduler.remove ()
method must be given the name of the event and the id (objectID and not a String as indicated in the documentation) . Ex:
scheduler.remove('my-event', objectId('5a5dfd6c4879489ce958df0c'), null, (err) => {
if (err) {
throw err;
}
});
The pull request that you propose is a good idea :)
AlexanderProd,
I will deploy this fix in the next version (1.2.3). Can you confirm that this is correct once the downloaded update on your project?
Yeah the fix is working, I've already tried it on my project in development. Just waiting for the release to use it in production.
Hey Alexander !
I made a big update! Be careful, it breaks a lot of things, I advise you to watch the new doc to make the necessary adaptations :)
I've been trying to delete a single event by providing an
eventName
as well as anid
toscheduler.remove()
but it doesn't remove anything and just resultsI've used an ID returned by
scheduler.list()
Also the usage of
collection.remove
with mongodb seems to be deprecated but I guess it should work anyways.I'm using version 1.2.1