Merge lp:~steve-salevan/gearmand/fix_redis_queue into lp:gearmand

Proposed by Steve Salevan on 2013-06-11
Status: Merged
Merged at revision: 767
Proposed branch: lp:~steve-salevan/gearmand/fix_redis_queue
Merge into: lp:gearmand
Diff against target: 12 lines (+1/-1)
1 file modified
libgearman-server/plugins/queue/redis/ (+1/-1)
To merge this branch: bzr merge lp:~steve-salevan/gearmand/fix_redis_queue
Reviewer Review Type Date Requested Status
Tangent Trunk 2013-06-11 Pending
Review via email:

Description of the change

Hey there!

This patch enables operation of Redis as a Gearman queueing backend via fixing a minor bug in the logic used to delete Redis keys; it appears that the logic in the current code may have been confused with a call to the logging subsystem. Redis-backed queue persistence has worked reliably for us over the past month or so with this fix, so I wanted to submit it to the upstream for review.

Let me know if I can supply any further information; otherwise, thanks much for the review!
-Steve Salevan
<email address hidden>

To post a comment you must log in.
Brian Aker (brianaker) wrote :


Brian Aker (brianaker) wrote :

BTW looking through the code I found a couple of issues (one is that it couldn't talk to servers that weren't localhost... which I fixed).

The other issue is that priority and when are not currently stored. I believe that with redis you can store complex objects right?

If so it would be good to fix that.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libgearman-server/plugins/queue/redis/'
2--- libgearman-server/plugins/queue/redis/ 2013-05-12 01:03:50 +0000
3+++ libgearman-server/plugins/queue/redis/ 2013-06-11 19:03:29 +0000
4@@ -231,7 +231,7 @@
5 std::vector<char> key;
6 build_key(key, unique, unique_size, function_name, function_name_size);
8- redisReply *reply= (redisReply*)redisCommand(queue->redis(), "DELETE %.*s", key.size(), &key[0]);
9+ redisReply *reply= (redisReply*)redisCommand(queue->redis(), "DEL %b", &key[0], key.size());
10 if (reply == NULL)
11 {


People subscribed via source and target branches

to all changes: