metatype
metatype copied to clipboard
fix(subs): key collision on redis
trafficstars
Follow up of #863 When multiple start occurs for redis, some schedules can happen exactly at the same time resulting into the same identifier (and leading to an inconsistent state).
This solution simply combines the schedule with the run_id making it unique instead of using it as is.
mutation AllAtOnce {
a: start_retry(kwargs: { .. }) # => calls add_schedule( ... date ...)
b: start_retry(kwargs: { .. })
c: start_retry(kwargs: { .. })
d: start_retry(kwargs: { .. })
e: start_retry(kwargs: { .. })
f: start_retry(kwargs: { .. })
# ..
}
Migration notes
None
- [ ] The change comes with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change