Skip to content

Commit

Permalink
Merge pull request #831 from nruth/patch-1
Browse files Browse the repository at this point in the history
Update README.md - document delay params
  • Loading branch information
sferik committed Sep 14, 2015
2 parents 8f7550e + c3fe927 commit a541b41
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,17 @@ device = Device.new
device.deliver
```

handle_asynchronously can take as options anything you can pass to delay. In
addition, the values can be Proc objects allowing call time evaluation of the
value. For some examples:
## Parameters

`#handle_asynchronously` and `#delay` take these parameters:

- `:priority` (number): lower numbers run first; default is 0 but can be reconfigured (see below)
- `:run_at` (Time): run the job after this time (probably in the future)
- `:queue` (string): named queue to put this job in, an alternative to priorities (see below)

These params can be Proc objects, allowing call-time evaluation of the value.

For example:

```ruby
class LongTasks
Expand Down

0 comments on commit a541b41

Please sign in to comment.