Commit f8c64487 authored by 郭阔's avatar 郭阔

fix(panel): define now before schedule-state loop (500 regression)

parent 3256e4bb
...@@ -648,6 +648,7 @@ def index(): ...@@ -648,6 +648,7 @@ def index():
sources.sort(key=lambda s: (0 if s.get("toggle_on") else 1, s["source"])) sources.sort(key=lambda s: (0 if s.get("toggle_on") else 1, s["source"]))
# macOS launchd 无 systemd 服务态:状态列统一用调度状态(active/disabled/none) # macOS launchd 无 systemd 服务态:状态列统一用调度状态(active/disabled/none)
now = datetime.now()
for s in sources: for s in sources:
sched = pl.schedule_state(s["source"]) sched = pl.schedule_state(s["source"])
s["active"] = {"active": "active", "disabled": "inactive"}.get(sched, "none") s["active"] = {"active": "active", "disabled": "inactive"}.get(sched, "none")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment