Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlemke committed May 17, 2022
1 parent 046b1d2 commit 18f2cf4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ Neos Flow package that allows for asynchronous and distributed execution of task
}
```

or use attributes instead of annotations (PHP 8.0 and later):

```php
use Flowpack\JobQueue\Common\Annotations as Job;

class SomeClass {

#[Job\Defer(queueName: "some-queue")]
public function sendEmail($emailAddress)
{
// send some email to $emailAddress
}
}
```

*Note:* The method needs to be *public* and it must not return anything

5. **Start the worker (if required)**
Expand Down

0 comments on commit 18f2cf4

Please sign in to comment.