Skip to content

v4.3.3

Latest

Choose a tag to compare

@sylvesterdamgaard sylvesterdamgaard released this 24 Sep 13:04
5b57feb

Fixed

  • queue:autoscale no longer crashes when the host app uses immutable dates. Apps that call Date::use(CarbonImmutable::class) get a CarbonImmutable from now(), but the manager passed now() into timestamps typed as mutable Illuminate\Support\Carbon. The first worker spawn threw TypeError: WorkerProcess::__construct(): Argument #4 ($spawnedAt) must be of type Illuminate\Support\Carbon, Carbon\CarbonImmutable given, so no worker ever started. Termination and workload-state cleanup had the same problem. WorkerProcess and WorkloadStateTracker now take CarbonInterface, so both mutable and immutable dates work. (#73)

Upgrading

No configuration changes. Passing a Carbon still works. WorkerProcess::$spawnedAt now reads as CarbonInterface. A subclass of WorkerProcess that overrides markTerminationRequested() or terminationDeadlinePassed() with Carbon parameters has to widen them. Restart every queue:autoscale after upgrading.