Compare commits

...

3 Commits

Author SHA1 Message Date
Louis Lam
b7daebbd57 Update to 1.23.5-beta.0 2023-11-17 14:46:20 +08:00
Louis Lam
e9bc754b3f Ops 2023-11-16 21:51:03 +08:00
Louis Lam
50cc91d2ca Try to fix timeout again 2023-11-16 21:32:12 +08:00
5 changed files with 12 additions and 4 deletions

7
db/patch-timeout.sql Normal file
View File

@@ -0,0 +1,7 @@
-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
BEGIN TRANSACTION;
UPDATE monitor SET timeout = (interval * 0.8)
WHERE timeout IS NULL OR timeout <= 0;
COMMIT;

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "uptime-kuma",
"version": "1.23.4",
"version": "1.23.5-beta.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "uptime-kuma",
"version": "1.23.4",
"version": "1.23.5-beta.0",
"license": "MIT",
"dependencies": {
"@grpc/grpc-js": "~1.7.3",

View File

@@ -1,6 +1,6 @@
{
"name": "uptime-kuma",
"version": "1.23.4",
"version": "1.23.5-beta.0",
"license": "MIT",
"repository": {
"type": "git",

View File

@@ -83,6 +83,7 @@ class Database {
"patch-add-gamedig-given-port.sql": true,
"patch-notification-config.sql": true,
"patch-fix-kafka-producer-booleans.sql": true,
"patch-timeout.sql": true,
};
/**

View File

@@ -369,7 +369,7 @@ class Monitor extends BeanModel {
// Runtime patch timeout if it is 0
// See https://github.com/louislam/uptime-kuma/pull/3961#issuecomment-1804149144
if (this.timeout <= 0) {
if (!this.timeout || this.timeout <= 0) {
this.timeout = this.interval * 1000 * 0.8;
}