pote / disc

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

Expose more addjob options #15

Closed felixbuenemann closed 9 years ago

felixbuenemann commented 9 years ago

Disque supports multiple parameters to control job execution:

ADDJOB queue_name job <ms-timeout>
  [REPLICATE <count>]
  [DELAY <sec>]
  [RETRY <sec>]
  [TTL <sec>]
  [MAXLEN <count>]
  [ASYNC]

It seems currently only delay is exposed in disc. Shouldn't it be possible to set the other options on the job class and when enqueing? The retry time strikes me as particularly important, because it depends on the average execution time of each job.

foca commented 9 years ago

:+1:

Given that disque-rb already allows this, it should be pretty easy to implement. Care to send a PR? :heart:

felixbuenemann commented 9 years ago

I'm not yet using disc anywhere, but I'll give it a shot.