-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
We need to be able to perform jobs by batches in a new project - that makes it possible to do bulk inserts in mysql etc.
right now retools uses BPOPL so it's one element each time.
here's one way to do batches:
- create one list per worker
- use BRPOPLPUSH and fill the worker-specific list with elements
- wait until the worker-specific list has the size of the batch, then push its content to the function and purge it
- use a timer to treat the list when len < batch_size for too long
- use another list to track all workers lists, so we can ventilate existing elements to a new worker when a worker goes down
What do you think ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels