spatie / mailcoach-support

Questions and support for Mailcoach
https://mailcoach.app
31 stars 2 forks source link

Horizon queue not actioning Mailcoach tasks. #285

Closed michael-presentcompany closed 3 years ago

michael-presentcompany commented 3 years ago

Describe your issue

I have configured Mailcoach as its own project (composer create-project spatie/Mailcoach) But I'm having a number of issues.

  1. Every time I deploy with envoyer.io onto my own AWS instance, the mail configuration is lost. This is not the end of the world, but its annoying to have to re-input the data each time. Is it possible to set these variables in the .env file?

  2. The queue is not actioning anything. Ive tried to send emails, or import users, both do not get actioned.

I followed (https://medium.com/@driesvints/laravel-horizon-with-forge-and-envoyer-82a7e819d69f) to configure envoyer to terminate and purge horizon on each deployment, however the queue doesn't action anything, even though there are no errors in the horizon dashboard. As you can see from below, everything is running as expected, but nothing appears to be actioned.

I can see on the server that the horizon process is running, and gets restarted when I terminate it. I can also confirm that its pointed at the correct "current" folder.


Health check:

Environment: production Debug: OFF Horizon: Active Queue connection: OK Webhooks: 0 unprocessed webhooks Schedule: ran 0 minute(s) ago Default mailer: mailcoach Mailcoach mailer: null Campaign mailer: null Transactional mailer: null

Technical details

App directory: /var/www/mailcoach/releases/20201129212740 User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_0_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36 PHP version: 7.4.13 MySQL version: 5.7.12 Laravel version: 8.16.1 Horizon version: v5.5.0@66743f65a55a71f52b5308de1a09fe5fd8453bcb laravel-mailcoach version: 3.3.0 mailcoach-ui version: 1.1.0

freekmurze commented 3 years ago

Every time I deploy with envoyer.io onto my own AWS instance, the mail configuration is lost. This is not the end of the world, but its annoying to have to re-input the data each time. Is it possible to set these variables in the .env file?

The config values are saved in a json file. You could opt to add this to version control as well. If that isn't possible, you might want to add the values to your .env file and add a small command that writes that json file after deploy based on those env variables.

The queue is not actioning anything. Ive tried to send emails, or import users, both do not get actioned. What do you mean with actioned? if you mean "executed", then there is something wrong with Horizon config on AWS. I would recommend trying to deploy a small project with Horizon and dispatch a job using that app. If that does fail, you have an easier way to debug it using that small app.