Skip to content

Commit 46640d4

Browse files
author
Eugene Leonovich
committed
Tweak README examples
1 parent 9e351ef commit 46640d4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,22 +137,22 @@ $data = $task->getData();
137137

138138
// process $data
139139

140-
$this->queue->ack($task->getId());
140+
$queue->ack($task->getId());
141141
```
142142

143143
Or put back into the queue in case it cannot be executed:
144144

145145
```php
146-
$this->queue->release($task->getId());
146+
$queue->release($task->getId());
147147

148148
// for ttl-like queues you can specify a delay
149-
$this->queue->release($task->getId(), ['delay' => 30]);
149+
$queue->release($task->getId(), ['delay' => 30]);
150150
```
151151

152152
To look at a task without changing its state, use:
153153

154154
```php
155-
$task = $this->queue->peek($task->getId());
155+
$task = $queue->peek($task->getId());
156156
```
157157

158158
To bury (disable) a task:
@@ -170,7 +170,7 @@ $count = $queue->kick(3); // kick 3 buried tasks
170170
A task (in any state) can be deleted permanently with `delete()`:
171171

172172
```php
173-
$this->queue->delete($task->getId());
173+
$queue->delete($task->getId());
174174
```
175175

176176
> For a detailed API documentation, please read [API](https://github.com/tarantool/queue#api)

0 commit comments

Comments
 (0)