feat: harden cron execution recovery and expose scheduling diagnostics

Reconcile scheduled and system cron triggers, isolate concurrent executions and retain verifiable exit statistics across restarts. Add paged task history, log and script browsing, dashboard timing details and regression coverage.
This commit is contained in:
whyour committed 2026-11-17 01:01:57 +08:00
1 parent 3b6a873520
commit 8a9e70e90b
166 files changed
+18942 -1800

No files matched your search

+25
View File
@@ -141,3 +141,28 @@ try:
builtins.QLAPI = QLAPI
except Exception as error:
print(f"run builtin code error: {error}\n")
# A line event in the entry module occurs after interpreter startup, imports
# performed by this preload, and the configured before hook.
def observe_script_start(target, marker):
if sys.gettrace() is not None:
return
def first_line(frame, event, arg):
if event == 'line':
import time
try:
with open(marker, 'x') as receipt:
receipt.write(str(time.time_ns() // 1000000))
except OSError:
pass
sys.settrace(None)
return first_line
def enter(frame, event, arg):
if event == 'call' and frame.f_code.co_name == '<module>' and os.path.realpath(frame.f_code.co_filename) == target:
return first_line
return None
sys.settrace(enter)
if os.getenv('QL_SCRIPT_ENTRY') and os.getenv('QL_SCRIPT_START_FILE'):
observe_script_start(os.environ['QL_SCRIPT_ENTRY'], os.environ['QL_SCRIPT_START_FILE'])