resque-job-stats
resque-job-stats copied to clipboard
Atomicity issue when incrementing and setting expiration
Hello,
We had a couple of issues recently where some time series values got an empty string without expiration.
Shouldn't the code in https://github.com/alanpeabody/resque-job-stats/blob/v0.4.2/lib/resque/plugins/job_stats/timeseries.rb#L50 be wrapped with a MULTI
command ?
We can get a PR going if their is willingness to merge it.
Thanks!
@bilby91 sounds reasonable to me - if you want to do a PR, a couple requests
- looks like actually it's
incr_timeseries
that should use the transaction, to keep minutes stats in sync with hours stats - there are other places in the codebase that are subject to the same problem, e.g.
push_history
inhistory.rb
- if you tackled these as well that would be 💯