perf: support skip server performance check via env var

This commit is contained in:
halo
2026-06-23 22:18:06 +08:00
parent 10b0585199
commit 4d9e69a620

View File

@@ -1,5 +1,6 @@
# coding: utf-8
import datetime
import os
from celery import shared_task
from celery.exceptions import SoftTimeLimitExceeded
@@ -152,6 +153,8 @@ def create_or_update_registered_periodic_tasks():
)
@register_as_period_task(interval=3600)
def check_server_performance_period():
if os.environ.get('SKIP_SERVER_PERFORMANCE_CHECK', False):
return
ServerPerformanceCheckUtil().check_and_publish()