I was working on implementing settings for emails, taxes, SMS providers so the client can change the credentials by themselves and switch between some providers.
That credentials and active providers are stored in the database, and I get 'em in the AppServiceProvider and overrider the config with 'em
But I had an issue with Queue Jobs
Since queue workers are long-lived processes, they will not notice changes to your code without being restarted
So I was in front of 2 solutions
- Restart the worker after updating DB
- Change how some integrated services like "Mail" get the config and replace 'em from database
I choose the 2nd solution since it's challenging π
Top comments (0)