diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-12-17 18:14:11 +0200 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-12-17 18:14:11 +0200 |
commit | 570bbf6a1312f3c236a0ac8113fd4cd27c3fc51e (patch) | |
tree | 4cc34f0ff23b5a8f1002c09223fb9491cd10a4e0 /t | |
parent | 1b0548485335df7735abc2c66280b31aa98d866c (diff) |
Treat our Redis queue as a set.
This means that tests will only ever be enqueued once, regardless
of how many times they are parsed.
In the past we could have a configuration file that read:
test1 ..
test2 ..
test3 ..
Parsing/adding this file would result in a queue looking like so:
test1 ..
test2 ..
test3 ..
test1 ..
test2 ..
test3 ..
test1 ..
test2 ..
test3 ..
Now the queue will *ALWAYS* look like this:
test1 ..
test2 ..
test3 ..
In the normal course of events this won't matter, as teh processing
loop will look like so:
* Add new jobs every minute.
* Worker runs the jobs.
In the case of a failing job though the test might take 2.5 minutes
and that will cause the queue to backup. (2.5 minutes because a test
is repeated 5 times before a fail is announced, and the timeout is
30 seconds. These values can and should be tweaked.)
With the new method even if the queue is slowly draining the queue
will never grow to containu hundreds of events it will just be "topped
up" not "overflowing".
Thanks to James Hannah for the suggestion, and James Lawrie for
the patience.
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions