Download the PHP package aligent/async-bundle without Composer
On this page you can find all versions of the php package aligent/async-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aligent/async-bundle
More information about aligent/async-bundle
Files in aligent/async-bundle
Package async-bundle
Short Description A bundle for extending Oro's Async processing
License MIT
Informations about the package async-bundle
Aligent Async Events Bundle
This bundle provides:
-
An Abstract Processor class that will catch RetryableExceptions and after 3 (default) retries place the failed jobs into the database so they can be reviewed, fixed and then requeued.
- Webhook integration
Installation Instructions
-
Install this module via Composer
composer require aligent/async-bundle
-
Clear cache
php bin/console cache:clear
-
Run Migrations
php bin/console oro:migration:load --force
Usage
Make sure your class extends the AbstractRetryableProcessor and perform your normal job processing in the execute function.
By default the AbstractRetryableProcessor will fetch the passed exception from the RetryableException and store the trace. However if you aren't catching an exception you can just use the RetryableException and it will store the trace and message generated at this point.
You can also increase or decrease the amount of retries by overriding const MAX_RETRIES = 3;
in your own class.
Set up Transport for Webhooks
Go to the "System -> Integrations -> Manage integrations" and click "Create Integration". Select "Webhook" as the integration type and fill all required fields.
To Enable set status as Active.
Once complete you must now receive webhook events to requested URL.
Dispatch webhook events
-
EntityEventListener listens to any create/update/delete events; check if relevant webhook transport exists and active; if yes, pushes message to the queue
-
WebhookEntityProcessor builds a payload and send a webhook event in response to the queued message.
- If you need to enrich payload data (ex., add addreses for the customer user), you can use OroImportExportBundle and add some custom normalizers to add/transform payload data.
Support
If you have any issues with this bundle, please create a GitHub issue.
Contribution
Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.
Developer
Adam Hall [email protected]