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

Proposed by Steve Salevan
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/queue.cc (+1/-1)
To merge this branch: bzr merge lp:~steve-salevan/gearmand/fix_redis_queue
Reviewer Review Type Date Requested Status
Tangent Trunk Pending
Review via email: mp+168792@code.launchpad.net

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.
Revision history for this message
Brian Aker (brianaker) wrote :

Thanks!

Revision history for this message
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
=== modified file 'libgearman-server/plugins/queue/redis/queue.cc'
--- libgearman-server/plugins/queue/redis/queue.cc 2013-05-12 01:03:50 +0000
+++ libgearman-server/plugins/queue/redis/queue.cc 2013-06-11 19:03:29 +0000
@@ -231,7 +231,7 @@
231 std::vector<char> key;231 std::vector<char> key;
232 build_key(key, unique, unique_size, function_name, function_name_size);232 build_key(key, unique, unique_size, function_name, function_name_size);
233233
234 redisReply *reply= (redisReply*)redisCommand(queue->redis(), "DELETE %.*s", key.size(), &key[0]);234 redisReply *reply= (redisReply*)redisCommand(queue->redis(), "DEL %b", &key[0], key.size());
235 if (reply == NULL)235 if (reply == NULL)
236 {236 {
237 return GEARMAND_QUEUE_ERROR;237 return GEARMAND_QUEUE_ERROR;

Subscribers

People subscribed via source and target branches

to all changes: