bug fix: send notifications for failed backups

This commit is contained in:
usmannasir
2024-05-30 19:51:05 +04:00
parent 3ec4ad8908
commit 3f17588ad4

View File

@@ -837,13 +837,13 @@ Automatic backup failed for %s on %s.
startCheck = 0 startCheck = 0
for directory in directories: for directory in directories:
if directory.find(site.domain): if directory.find(site.domain):
print(f'site in backup, no need to notify {site.domain}')
startCheck = 1 startCheck = 1
break break
if startCheck: if startCheck:
'send notification that backup failed' 'send notification that backup failed'
import requests import requests
import json
# Define the URL of the endpoint # Define the URL of the endpoint
url = 'http://platform.cyberpersons.com/Billing/BackupFailedNotify' # Replace with your actual endpoint URL url = 'http://platform.cyberpersons.com/Billing/BackupFailedNotify' # Replace with your actual endpoint URL