fiveai / Cachet

📛 An open source status page system for everyone.
https://cachethq.io
BSD 3-Clause "New" or "Revised" License
101 stars 28 forks source link

Email notification about upcoming maintenance #25

Closed Yves911 closed 3 years ago

Yves911 commented 3 years ago

Hello,

Currently it seems that the system is not able to send emails about upcoming maintenance. I have double checked the checkbox to notify users is checked at the new maintenance creation form.

Other emails notifications are working fine.

Cheers Yves

sedan07 commented 3 years ago

Hi @Yves911.

So I can confirm the system currently does send emails notifying about upcoming maintenance and if your other emails are working I would suggest the issue probably lies in one of the following: Currently the notification system for maintenance is rather basic and so it only notifies people who are globally subscribed #26. It also won't send out emails during another maintenance windows #11

I'll double check the code to check I'm not missing any other situations where it doesn't send them. Let me know if neither of the above is the issue and we'll look into it further.

sedan07 commented 3 years ago

@Yves911 did you make any progress looking into this?

Yves911 commented 3 years ago

Hi @sedan07 i made few additional tests with no luck : no emails for upcoming maintenance.

qwertiko commented 3 years ago

Hi @Yves911 ,

what do you have configured in your .env file for the QUEUE_DRIVER?

Yves911 commented 3 years ago

@qwertiko QUEUE_DRIVER=database

qwertiko commented 3 years ago

is the queue listener running php artisan queue:listen ? is there output from the command php artisan queue:failed ?

alternatively you can check your database for entries in the jobs table as well as the failed_jobs table?

Yves911 commented 3 years ago

@qwertiko you were right listener wasn't running : php artisan queue:listen after this command i got emails about scheduled maintenance Thanks !

MathisG-Recia commented 3 years ago

Hello, I would like to know more about maintenance notifications, when I use php artisan queue:listen some of the requests run other do nothing.

qwertiko commented 3 years ago

@MathisG-Recia php artisan should show you a bunch of commands you can use, among others the following related to the queue:

queue
  queue:failed         List all of the failed queue jobs
  queue:failed-table   Create a migration for the failed queue jobs database table
  queue:flush          Flush all of the failed queue jobs
  queue:forget         Delete a failed queue job
  queue:listen         Listen to a given queue
  queue:restart        Restart queue worker daemons after their current job
  queue:retry          Retry a failed queue job
  queue:table          Create a migration for the queue jobs database table
  queue:work           Start processing jobs on the queue as a daemon

perhaps the queue:failed option will give you some details. If the queue is empty, obviously nothing would happen. Also if your queue driver is not configured correctly. I spotted that some queue drivers did not work for me at all.

MathisG-Recia commented 3 years ago

This is my configuration: CACHE_DRIVER=database SESSION_DRIVER=database QUEUE_DRIVER=database I noticed that when I had a mistake in the queue that after it no longer worked. I have use php artisan queue:restart but this do nothing. Now when I create a maintenance the queue does nothing.