vapor / queues

A queue system for Vapor.
MIT License
169 stars 41 forks source link

Wait for notifications to be dispatched #100

Closed jdmcd closed 3 years ago

jdmcd commented 3 years ago

Fixes a race condition where a job could be marked as "running" in your notification consumer while it had actually succeeded.

Note: If you don't have any notification delegates registered this release will have no performance impact. If you are using notification delegates the dispatch function will now wait until all notifications have been sent to return.

0xTim commented 3 years ago

LGTM - I don't suppose there's a way to test this?

jdmcd commented 3 years ago

@0xTim not that I can think of, unfortunately. Since the race condition only pops up if there are speed problems with the database or a super fast job

VaporBot commented 3 years ago

These changes are now available in 1.5.2