pote / disc

Simple Disque-powered Ruby Jobs
MIT License
129 stars 6 forks source link

Extend job options #17

Closed felixbuenemann closed 9 years ago

felixbuenemann commented 9 years ago

Adds support for passing arbitrary options to discque-rb's push method when enqueuing jobs – see #15 for discussion.

I also made the default queue configurable via Disc.default_queue = "example" and added integration tests for all ADDJOB options.

The async tests is not very meaningful, because the timing is too tight to check for an empty queue and maxlen tests for probably wrong behavior in disque, see antirez/disque#109 for more info.

felixbuenemann commented 9 years ago

Updated the replicate test to use a higher node number to ensure it works even if the system running the tests has a small disque cluster.

felixbuenemann commented 9 years ago

Fixed the Disc::Job.queue default bug described by @foca.

pote commented 9 years ago

We're likely to change the way we manipulate Disc options (as seen in #22), but I think we can merge this now even with that in consideration, the extra tests can't hurt either. :)

Thanks for the PR! :tada: :heart: :dancer: :tada: