cli cleanup

pull/805/head
DJ2LS 2024-09-28 08:02:25 +02:00
parent d55c692d2a
commit 3438518d27
3 changed files with 11 additions and 7 deletions

7
.gitignore vendored
View File

@ -28,4 +28,9 @@ coverage.xml
#GUI_WEB
/freedata_gui/dist
/freedata_gui/node_modules
/freedata_gui/node_modules!/venv/
# venv packages
venv_3.11/
venv/
test_venv/

View File

@ -28,12 +28,8 @@ class DatabaseManagerMessages(DatabaseManager):
# Parse the timestamp from the message ID
timestamp = datetime.fromisoformat(message_data['id'].split('_')[2])
print("-------")
print(frequency)
if frequency and frequency not in ['---']:
statistics["frequency"] = frequency
print(statistics)
# Create the P2PMessage instance
new_message = P2PMessage(

View File

@ -119,8 +119,11 @@ class ScheduleManager:
if session.is_IRS and session.last_state_change_timestamp + 90 < time.time():
self.log.warning(f"[SCHEDULE] [ARQ={session_id}] Setting state to", old_state=session.state, state=IRS_State.RESUME)
try:
# if session state is already RESUME, don't set it again for avoiding a flooded cli
if session.state not in [session.state_enum.RESUME]:
session.state = session.set_state(session.state_enum.RESUME)
session.state = session.state_enum.RESUME
except Exception as e:
self.log.warning("[SCHEDULE] error setting ARQ state", error=e)