I haven't seen this mentioned anywhere

I haven't seen this mentioned anywhere in the docs - I can't figure out if sleeping executions are counted towards the concurrency limit. https://discord.com/channels/595317990191398933/1301574574508474399
9 Replies
movaid7
movaid7OP3mo ago
Sorry for the crosspost - found this channel just after I posted the question in general-help
Seekerdasbatatas
There's some grace period but after some time, they start to not count towards the limit because its in a "Waiting" status
makrdev
makrdev3mo ago
How long does it take? Are we talking about a long period like hours-minutes or just a couple seconds? Also, is this grace period applied to the ‘pause’ state as well?
movaid7
movaid7OP2mo ago
@Seekerdasbatatas I've got the same question as @makrdev
Seekerdasbatatas
When it's "pause" it's actually paused and grace period don't apply there's "waitingForPause" state tho
makrdev
makrdev2mo ago
What about the duration of the grace period you mentioned?
Warren
Warren5w ago
is the main difference between sleep and setTimeout that sleeping will reduce concurrency, but not setTimeout?
Seekerdasbatatas
With sleep, you can sleep up to a year with the guarantee that will start again and pick up in the right place - with setTimeout you have no guarantees (probably will work well enough for small amounts of time, but it's nice to have the guarantee)
Warren
Warren5w ago
Got it thanks!

Did you find this page helpful?