mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 15:35:55 +03:00
[GH-ISSUE #516] [FEATURE REQUEST] Per-task type aggregation #2264
Labels
No labels
CLI
bug
designing
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
idea
invalid
investigate
needs-more-info
performance
pr-welcome
pull-request
question
wontfix
work in progress
work in progress
work-around-available
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asynq#2264
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @stephen on GitHub (Jul 13, 2022).
Original GitHub issue: https://github.com/hibiken/asynq/issues/516
Originally assigned to: @hibiken on GitHub.
Is your feature request related to a problem? Please describe.
I'm trying out the new task batching/aggregation feature from https://github.com/hibiken/asynq/issues/339. I would like to be able to configure grouping parameters on a task-level basis instead of on the server.
For instance, if I have one kind of batched task that sends out high-urgency notifications (i.e. group any in the last minute) and also a low-urgency notification (i.e. group any in the last day).
Describe the solution you'd like
I'd like to be able to specify wait/maxwait/maxsize/aggregation function per task, maybe like:
Describe alternatives you've considered
I think I could also achieve this by creating two separate servers (maybe even two asynq servers in the same process? I have not tested this yet).
Additional context
n/a
@stephen commented on GitHub (Jul 13, 2022):
(this may end up just becoming a thread of notes on the aggregation feature - let me know if I should split this out into different issues)
Another feedback might be to support returning errors from
GroupAggregatorFunc. The example doesn't return an error, but you could imagine a more complex aggregation function that needs to deserialize the individual tasks to build the aggregated one:@hibiken commented on GitHub (Jul 19, 2022):
@stephen Thanks for this great feedback! Let me think about API changes to accommodate these use cases