Skip to content

Commit

Permalink
Tweak README
Browse files Browse the repository at this point in the history
  • Loading branch information
rybakit committed Feb 5, 2018
1 parent efcac47 commit e924be9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,8 @@ $total = $queue->stats('tasks.total');
### Custom methods

Thanks to flexible nature of the [tarantool/queue](https://github.com/tarantool/queue/) module,
you can easily create your own queue drivers or extend existing ones with an additional functionality.
For example, let's say you want to add the `put_many` method to your `foobar` queue, which inserts
multiple tasks in a transaction:
you can easily create your own queue drivers or extend existing ones with an additional functionality.
For example, you added the `put_many` method to your `foobar` queue, which inserts multiple tasks in a transaction:

```lua
-- queues.lua
Expand All @@ -259,7 +258,7 @@ queue.tube.foobar.put_many = function(self, items)
end
```

To call it, pass the method name and corresponding arguments to `Queue::call()`:
To call this method on a `$queue` object, use `Queue::call()`:

```php
$result = $queue->call('put_many', [
Expand Down

0 comments on commit e924be9

Please sign in to comment.