riverqueue / river

Fast and reliable background jobs in Go
https://riverqueue.com
Mozilla Public License 2.0
3.59k stars 94 forks source link

docs: update MaxWorkers behaviour as it propagates down to the producer #647

Closed kamikazechaser closed 1 month ago

kamikazechaser commented 1 month ago

refs:

*https://github.com/riverqueue/river/blob/master/producer.go#L598

I think this makes it clear on how the max workers value should be tuned based on the job type.

bgentry commented 1 month ago

Hi @kamikazechaser, from looking at this I'm not quite sure what's missing from the original explanation that is made more clear with this change. The statement that MaxWorkers corresponds to max parallelism for the client seems concise and correct to me, without getting into internal details like the concept of an executor.

Can you maybe elaborate on what you think is missing from the original explanation? Would still like to improve this further if possible. Thanks.

kamikazechaser commented 1 month ago

without getting into internal details like the concept of an executor.

It was related to some question in one of the issues. But looking back at it now, it makes sense not to get into the internals of how the MaxWorkers option is utilized.