[5.4] Sync Event and CallbackEvent withoutOverlapping functions#20389
[5.4] Sync Event and CallbackEvent withoutOverlapping functions#20389taylorotwell merged 1 commit intolaravel:5.4from laurencei:patch-2
Conversation
|
I'm not sure this is actually needed / required for non-callback events? I'm not sure it is even used? |
|
@taylorotwell - it gives flexibility. If your command dies (i.e. the server reboots, PHP crashes etc etc) - your mutex remains for 24 hours because the after callbacks are never run. This PR allows some control to set a shorter (or longer) mutex if you want.
If you fire |
|
But where is expiresAt used by this class? |
|
It is used by the https://github.com/laravel/framework/blob/5.4/src/Illuminate/Console/Scheduling/CacheMutex.php#L36 So right now all |
The signatures for
withoutOverlapping()inEventandCallbackEventare different.This sync's up the
Eventto matchCallbackEvent, allowing people to set a cache expiration time onEventin the same way as aCallbackEvent.Non-breaking change - will keep current behavior if no value is set.