Stations: pump the differential images into data_diff/ (pump_diff.sh through pumping.py, diff), beside the pumping of data/, each with its state and log
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cce6b850c6
commit
6b3f46434a
4 files changed
+28
-21
No files matched your search
@@ -236,7 +236,7 @@ def weather(hours):
|
||||
|
||||
# --- the tracked stations and the pumping: extraction/pumping.py of ~/aimsight-data
|
||||
|
||||
pump_process = None # the pumping launched by the app
|
||||
pump_process = {} # the pumpings launched by the app, by diff (pump_diff.sh, into data_diff/: beside pump.sh)
|
||||
|
||||
|
||||
def save_tracked(rows):
|
||||
@@ -246,22 +246,22 @@ def save_tracked(rows):
|
||||
raise Refusal(str(e))
|
||||
|
||||
|
||||
def pump_state():
|
||||
def pump_state(diff=False):
|
||||
"""{running, log}; the end of the app's pumping empties the cache of the detectors' events."""
|
||||
global pump_process
|
||||
if pump_process and pump_process.poll() is not None:
|
||||
pump_process = None
|
||||
if (p := pump_process.get(diff)) and p.poll() is not None:
|
||||
del pump_process[diff]
|
||||
detectors.cache_clear()
|
||||
return {"running": pumping.running() or pump_process is not None, "log": pumping.log()}
|
||||
return {"running": pumping.running(diff) or diff in pump_process, "log": pumping.log(diff=diff)}
|
||||
|
||||
|
||||
def pump(body):
|
||||
global pump_process
|
||||
diff = bool(body.get("diff"))
|
||||
try:
|
||||
pump_process = pumping.start(body.get("stations") or [], body.get("start") or "", body.get("end") or "", body.get("images"))
|
||||
pump_process[diff] = pumping.start(body.get("stations") or [], body.get("start") or "", body.get("end") or "",
|
||||
body.get("images"), diff)
|
||||
except ValueError as e:
|
||||
raise Refusal(str(e))
|
||||
return pump_state()
|
||||
return pump_state(diff)
|
||||
|
||||
|
||||
# --- the Data page, "Detectors" labels: the events of the journal, read-only
|
||||
|
||||
Reference in new issue
Block a user