Closed mhjb closed 5 years ago
@mhjb , are you also getting this with postgres-db?
Yes:
2018-11-14 13:00:00error: Unhandled Rejection in Promise: Promise { _bitField: 18087936, _fulfillmentHandler0: { error: duplicate key value violates unique constraint "scheduler_tasks_scheduleid_scheduledon_unique" at Connection.parseE (/app/node_modules/pg/lib/connection.js:567:11) at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:391:17) at Socket.
Confirmed - getting the same problem, error conditions and error messages as @mhjb
Looks like some synchronization bugs with delete/insert running out of order
Just FYI these look very similar to the issues I had to fix for loading contexts https://github.com/botpress/botpress/pull/891/commits/d26a0f385e95450670cf2ca1c84ee0a1d855a914
Now the final/real/tested fix...
Synchronization wasn't the problem (though I added https://github.com/botpress/botpress/pull/891/commits/1a0593d7942edfffc91d82b5dc8be65f86d7bb76 to improve it further)
The tasks were failing because the same event could be re-triggered at the same moment. This was finally fixed by adding 5 seconds to "now" for calculating the next event https://github.com/botpress/botpress/pull/891/commits/1858edb5c4a627687435e3914cfc37ccba7c4b08
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
8.9
10.51.0
I create a new scheduled task:
It turns up in the list of upcoming tasks:
It runs once, successfully, but also gives this error:
… and then it's no longer in the scheduled task list:
Can you help?