You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.
More than happy to draft and PR - i thought i'd float the idea first, and pick an implementation before getting too deep into coding it.
In essence, it would be nice to be able to customise how the command scheduler's overlapping works. it currently stores a file in the storage directory. for multiple load-balanced servers, it would be nice if it could go somewhere else - a common resource to all servers, like a database or redis? a fringe benefit of using database / redis is that you wouldn't need to hash the command to make the mutex file name, so would make debugging commands a lot easier if there are tasks that are taking too long (which would be a possible solution to laravel/framework#12456). and would let you see what commands are running at that time.
There may be other things that i have not considered, but essentially, it writes the lock, performs the command, deletes the lock, and writes the output to wherever it was told to. it does this in a single process call.
My first thought would be to have a driver-based setup for scheduled events (similar to every other driver based thing in laravel) - something like:
create an OverlappingCommandVerifier contract - has 3 methods - checkIsRunning($command, $expression), and lockCommand($command, $expression) and unLockCommand($command, $expression)
Remove the mutexPath method from Schedule\Event, move to an implementation of the contract. (NB. This would slightly change the existing mutexPath implementation to break it up into 2 Processes either side of the actual scheduled process, rather than one chained Process. (if this is a problem, then i'm sure we can come up with an alternative interface to the one above))
Add implementation for redis / database (with a publishable migration for the database option)
Like i said, i thought i'd post it as an idea before getting too deep into an implementation of it. comments welcome.
The text was updated successfully, but these errors were encountered:
More than happy to draft and PR - i thought i'd float the idea first, and pick an implementation before getting too deep into coding it.
In essence, it would be nice to be able to customise how the command scheduler's overlapping works. it currently stores a file in the storage directory. for multiple load-balanced servers, it would be nice if it could go somewhere else - a common resource to all servers, like a database or redis? a fringe benefit of using database / redis is that you wouldn't need to hash the command to make the mutex file name, so would make debugging commands a lot easier if there are tasks that are taking too long (which would be a possible solution to laravel/framework#12456). and would let you see what commands are running at that time.
There may be other things that i have not considered, but essentially, it writes the lock, performs the command, deletes the lock, and writes the output to wherever it was told to. it does this in a single process call.
My first thought would be to have a driver-based setup for scheduled events (similar to every other driver based thing in laravel) - something like:
Like i said, i thought i'd post it as an idea before getting too deep into an implementation of it. comments welcome.
The text was updated successfully, but these errors were encountered: