mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-26 07:25:56 +03:00
[PR #776] [CLOSED] Adding a method to return a task's opts #859
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#859
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?
📋 Pull Request Information
Original PR: https://github.com/hibiken/asynq/pull/776
Author: @agorman
Created: 11/6/2023
Status: ❌ Closed
Base:
master← Head:task-options📝 Commits (1)
4f1174dAdding a method to return a task's opts📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
asynq.go(+1 -0)📄 Description
I'd like to add an
Options()method toTaskthat returns the[]Optionstored int.opts.My use case is that I'd like to be able to modify a task's payload inside a middleware. I haven't found a way that I can do that without losing the tasks options.
The way I'm currently doing it is as follows.
I believe adding an
Options()method to task is needed to preserve the options.If there is a better or already existing way to accomplish my use case I'd be happy to use that. Please let me know if adding the method and my use case is sane.
Thanks!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.