mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
Queued GetContainersStatus runs are unique per server until a worker starts them, and CleanupHelperContainersJob locks per server instead of class-wide. Add UniqueUntilProcessingJobDecorator for laravel-actions.
15 lines
536 B
PHP
15 lines
536 B
PHP
<?php
|
|
|
|
namespace App\Support\Actions;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldBeUniqueUntilProcessing;
|
|
use Lorisleiva\Actions\Decorators\UniqueJobDecorator;
|
|
|
|
/**
|
|
* Queued action job whose unique lock is released when a worker starts it, not when it finishes.
|
|
*
|
|
* laravel-actions only provides a decorator that holds the lock until the job finishes. An action
|
|
* opts in by returning this decorator from makeUniqueJob().
|
|
*/
|
|
class UniqueUntilProcessingJobDecorator extends UniqueJobDecorator implements ShouldBeUniqueUntilProcessing {}
|