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
We are using Scheduler in combination with Lock and encountering a minor issue with setting the expiration of locks. We followed the steps outlined in Efficient management with Symfony Scheduler
However, when attempting to refresh our lock, it passes a floating-point number, as shown below.
namespaceSymfony\Component\Scheduler\Generator;
finalclass Checkpoint implements CheckpointInterface
{
publicfunctionrelease(\DateTimeImmutable$now, ?\DateTimeImmutable$nextTime): void
{
// I stripped all the other code$this->lock->refresh((float) $nextTime->format('U.u') - (float) $now->format('U.u') + $remaining);
}
}
Then the refresh method calls putOffExpiration and that's when the error occurs.
Symfony version(s) affected
7.2.4
Description
We are using Scheduler in combination with Lock and encountering a minor issue with setting the expiration of locks. We followed the steps outlined in Efficient management with Symfony Scheduler
However, when attempting to refresh our lock, it passes a floating-point number, as shown below.
Then the
refresh
method callsputOffExpiration
and that's when the error occurs.How to reproduce
Used config:
When enabling the lock part of the Scheduler the following process is triggered:
Inside
DoctrineDbalStore
an UPDATE query is composed that reads:The value of the first ? contains the TTL.
That will result in an error like:
Possible Solution
I see two possible solutions:
If either of these solutions is viable, I'm happy to implement the necessary changes myself and contribute them back.
Additional Context
The text was updated successfully, but these errors were encountered: