Following on from this issue in the redis_queue module, I have made a start on merging the queue into this module.

#1369816: Merge this into Redis module

Patch will follow.

Comments

smoothify’s picture

Here is the patch.

Notes:

  1. I've kept the majority of redis_queue's implementation as is. The main difference is the prefix and key , generation which is now modelled on the cache implementation in this module.
  2. There is no predis implmentation, I haven't used that (yet) and am not aware of the differences.
  3. I was unsure about what namespace/prefixing to use, i went for base_domain:queue:name_of_queue in the end.
  4. There is a hook_cron implementation, which expires claimed queue items. Redis queue module actually has a redis_cron function rather than redis_queue_cron, so you will need to disable that module when using this new version.
  5. Since this is taken almost directly from redis_queue, there may be a difference of code styles, I haven't tried to rectify this yet - I was just focusing on getting a functional queue in place and start the ball rolling.
pounard’s picture

Nice effort! Really thanks. I will review this as soon as I can.

iler’s picture

@pounard Any progress on this one?

pounard’s picture

Status: Needs work » Postponed

Postponing it before first stable release. Don't worry this is still in the roadmap.

pounard’s picture

Title: Merge Redis Queue with this module » Implement the queue interface
Issue summary: View changes
Status: Postponed » Active

Actually working on this, I am not merging the Redis Queue module, it's rather simple and different at the same time, I'm writing a new implementation from scratch. Some of the Redis Queue module ideas are actually being used in my implementation (credits goes to them).

See http://cgit.drupalcode.org/redis/commit/?id=c43db92 for a first almost working implementation (only PhpRedis implemented yet, and item lease is not implemented, the rest should work gracefully).

  • Pierre.R committed 5be10bf on 7.x-2.x
    #2010716 - added documentation for queues
    
pounard’s picture

Note for myself: queue backend don't find the site prefix.

  • Pierre.R committed 5be10bf on 7.x-3.x
    #2010716 - added documentation for queues
    
pounard’s picture

Long time, no answer, I have to close this. 7.x-2.x is not really maintained anymore - even 7.x-3.x will soon go to freeze, and I'll probably create a 7.x-4.x branch in the near future.