mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 17:23:21 +00:00
chore: enable formatting over the entire codebase in CI (#6655)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
autofix-ci[bot]
parent
6658f2ce41
commit
0f61d7ee1b
@@ -15,7 +15,7 @@ class GoogleChat extends NotificationProvider {
|
||||
// If Google Chat Webhook rate limit is reached, retry to configured max retries defaults to 3, delay between 60-180 seconds
|
||||
const post = async (url, data, config) => {
|
||||
let retries = notification.googleChatMaxRetries || 1; // Default to 1 retries
|
||||
retries = (retries > 10) ? 10 : retries; // Enforce maximum retries in backend
|
||||
retries = retries > 10 ? 10 : retries; // Enforce maximum retries in backend
|
||||
while (retries > 0) {
|
||||
try {
|
||||
await axios.post(url, data, config);
|
||||
@@ -27,7 +27,7 @@ class GoogleChat extends NotificationProvider {
|
||||
throw error;
|
||||
}
|
||||
const delay = 60000 + Math.random() * 120000;
|
||||
await new Promise(resolve => setTimeout(resolve, delay));
|
||||
await new Promise((resolve) => setTimeout(resolve, delay));
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class GoogleChat extends NotificationProvider {
|
||||
monitorJSON,
|
||||
heartbeatJSON
|
||||
);
|
||||
const data = { "text": renderedText };
|
||||
const data = { text: renderedText };
|
||||
await post(notification.googleChatWebhookURL, data, config);
|
||||
return okMsg;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user