mirror of
https://github.com/hibiken/asynq.git
synced 2026-04-25 23:15:51 +03:00
[GH-ISSUE #373] [FEATURE REQUEST] Optional WAIT flag for Enqueue #162
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#162
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 @danthegoodman1 on GitHub (Dec 31, 2021).
Original GitHub issue: https://github.com/hibiken/asynq/issues/373
Originally assigned to: @hibiken on GitHub.
I think it would be useful to have the option to use or not use
WAIT {some number}with Enqueue such that we can have assurance that we durably wrote to Redis (when not using AOF).Since Redis can lose writes before syncing to a replica, this is still a conern present without AOF.
Maybe an
asynq.Wait(int)would be a parameter that would be passed to theclient.Enqueue()function.@hibiken commented on GitHub (Jan 1, 2022):
@danthegoodman1 Great feature request.
I believe synchronous replication is needed in some use cases and may be a common need.
Let me do a little bit more research around this to come up with a suggestion.
Any suggestion on the API is welcome!
@vishjain commented on GitHub (Jul 8, 2022):
@hibiken Can I submit a PR for this? Thanks!
@danthegoodman1 commented on GitHub (Oct 4, 2023):
bumping, this would be really helpful as temporal overhead is inappropriate for some use cases
@kamikazechaser commented on GitHub (Oct 5, 2023):
Possibly needs a refactor for https://github.com/hibiken/asynq/blob/master/internal/rdb/rdb.go#L152..
numreplicasandtimeoutmetadata need to be added tobase.TaskMessage.@danthegoodman1 commented on GitHub (Oct 5, 2023):
For those wondering, in the meantime you can just either add AOF (for single host deployments) or you can use a service like upstash redis/aws memorydb that natively has both persistence and HA.
Edit: AOF might work if only a single host in a cluster gets it too, but I have never tested or seen talk of that failover pattern (but I assume based on async replication it would sync it across the cluster)