hibiken / asynq

Simple, reliable, and efficient distributed task queue in Go
MIT License
9k stars 659 forks source link

[FEATURE REQUEST] aggregation task optimization #887

Open shuqingzai opened 1 month ago

shuqingzai commented 1 month ago

Is your feature request related to a problem? Please describe. Several problems were discovered using task aggregation:

  1. There is no error returned in the task aggregation interface. An error return should be added. When a large number of tasks are aggregated, errors will inevitably occur. If the error is returned, this aggregation task should be ignored.

See:

  1. When using the aggregation task function, you cannot set additional options, such as: task delay

See: https://github.com/hibiken/asynq/blob/d04888e74845fc7434c6a50755e62ec6ffda5911/aggregator.go#L163

  1. Aggregation capabilities at the queue task level cannot be set, and aggregation can only be set at the server level, which is not very suitable for some complex aggregation requirements.

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.