#Where do I specify how long a job is allowed to run?
20 messages · Page 1 of 1 (latest)
@runic patio I'm baffled how I have missed this
I searched for timeout, but only saw the tries configuration. It's more hidden below
Coming from a static typed language where I would just look at tech documentation, is there something like this for laravel?
Where I can see every function, class, argument, property, etc?
Something like this: https://pkg.go.dev/time#pkg-index
It's actually a bit more complicated than you'd think. There's also a retry_after setting on the queue connection, which must be higher than the highest $timeout. Otherwise the job might get released before the $timeout is reached.
awesome, thanks!
so this is then something I have to define where my workers are started?
where would a propertie like the timeout setting be found? It looks like I only get the interface when searching for it
the interface is probably the only concrete definition for it
but where would I see that this method will use a propetiey called $timeout on the job definition? https://laravel.com/api/11.x/Illuminate/Contracts/Queue/Job.html#method_timeout
I can only see this method here
you'd probably be better in github for that stuff https://github.com/laravel/framework/blob/b9cf7d3217732e9a0fa4f00e996b3f9cc5bf7abd/src/Illuminate/Queue/Jobs/Job.php#L14
jobs aren't the most typed thing in the world
yeah, I can see. thanks!