Closed abhihyder closed 1 week ago
Thanks for submitting the PR. I'll review it and let you know if I have any feedback
@abhihyder could you add or update the unit tests so that we have this change in coverage?
Hi @Kyon147, Thank you for the feedback!
I've updated the existing unit tests to cover the changes related to job dispatching on the correct connection. Specifically, I've added tests to ensure that the actions in AfterAuthorize
, DispatchScripts
, DispatchWebhooks
, and the WebhookController
trait are executed on the appropriate custom connection as defined in the configuration.
You can run the test cases with the following commands:
./vendor/bin/phpunit tests/Actions/AfterAuthorizeTest.php
./vendor/bin/phpunit tests/Actions/DispatchScriptsTest.php
./vendor/bin/phpunit tests/Actions/DispatchWebhooksTest.php
./vendor/bin/phpunit tests/Traits/WebhookControllerTest.php
Hey @abhihyder
I've fixed the lint issue and will get this out in the next release. Thanks for the PR 👍
Add Job Connections Configuration
Summary
This pull request introduces a new configuration option for setting specific job connections for webhooks, scripttags, and after_authenticate_job.
Details
job_connections
array in the configuration file to allow setting custom job connections for:This change allows developers to define separate job connections for each of these features, enabling better control and customization of their job handling process.
Environment Variables
To utilize the new job connections, the following environment variables can be set:
WEBHOOKS_JOB_CONNECTION
SCRIPTTAGS_JOB_CONNECTION
AFTER_AUTHENTICATE_JOB_CONNECTION
If these variables are not set, the default job connection will be used.
Benefits