SyliusSchedulerCommandPlugin icon indicating copy to clipboard operation
SyliusSchedulerCommandPlugin copied to clipboard

[Feature] give possibility to run multiple instances on one server

Open olivierharo opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. I have two websites hosted on the same server. I can't run twho schedulers

Describe the solution you'd like In this file vendor/synolia/sylius-scheduler-command-plugin/src/Command/SynoliaSchedulerRunCommand.php replace if (!$this->lock() { by if (!$this->lock(realpath(dirname(FILE)))) {

olivierharo avatar Sep 22 '23 10:09 olivierharo

Hello,

This function is already available. The plugin is based on symfony/lock, for which you can configure where the "lock" is stored.

In your case you can do : On website A :

#.env.local
LOCK_DSN='flock:///path/to/websiteA'

and, on website B :

#.env.local
LOCK_DSN='flock:///path/to/websiteB'

See documentation for more details.

Regards

oallain avatar Sep 23 '23 18:09 oallain