sendportal-core icon indicating copy to clipboard operation
sendportal-core copied to clipboard

Feature Request: override or disable the scheduler

Open mikerockett opened this issue 2 years ago • 0 comments

I am trying to run the package in a multi-tenant environment using Tenancy for Laravel. The task that is added to the scheduler is not aware of this, as it has no context.

As such, when the cron job fires, it does not do anything. Both of the below scenarios do not work:

  1. schedule:run or schedule:work in local environments
  2. tenants:run schedule:run or tenants:run schedule:work --tenants={tenant_id} in local environments (where tenant_id is the unique UUID of the tenant)

The only thing that does work is tenants:run sp:campaigns:dispatch, which makes it tenant aware at command level.

As such, it would be good if the scheduler built into the package could be disabled so that custom tenant logic could be added instead.

In the meantime, I'll move SendPortal out of the tenant scope – as much as I would like it to be there (for the purposes of separating concerns at tenant level), it is not absolutely crucial yet.

PS: Would be a nice first-option in that empty config file 😉

mikerockett avatar Apr 19 '22 11:04 mikerockett