LaWebcapsule / directus9

directus9 - openSource maintenance of directus
GNU General Public License v3.0
71 stars 9 forks source link

Add Support for PM2 multi-core and multiple instances #72

Open pageagency opened 2 months ago

pageagency commented 2 months ago

Describe the Bug

PM2 on multiple cores runs tasks multiple times and flows, emails, and in my case sms messages are sent once for each core. It looks like there has been a solution implmented here https://github.com/directus/directus/blob/46611e67512279127216ddeec99a810cfb450dce/api/src/synchronization.ts

To Reproduce

Setup a flow or cron job on a mult-core host, run pm2 in cluster mode.

Also, "npx directus --version" gives me 10.4.0, and current version here says 10.1.3.

Directus Version

10.4.0

Hosting Strategy

Self-Hosted (Custom)

adussarps commented 2 months ago

Hello @pageagency,

Thank you for raising this issue.

Regarding the fix that's already available in the official Directus repository, we are unable to copy it due to the repository's Business Source License.

However, you're welcome to propose a pull request to address the issue. If not, I'll aim to look into it in the coming months.

Best regards,

pageagency commented 2 months ago

Thank you.