From 03766b7e131e449e7d9e09451abd17466b83b875 Mon Sep 17 00:00:00 2001 From: Michael Woods Date: Sun, 16 Feb 2025 11:03:49 -0500 Subject: [PATCH] Adding session job log to session client jobs. --- src/packetserver/client/jobs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/packetserver/client/jobs.py b/src/packetserver/client/jobs.py index 44508ce..baba70f 100644 --- a/src/packetserver/client/jobs.py +++ b/src/packetserver/client/jobs.py @@ -103,11 +103,12 @@ def get_job_id(client: Client, bbs_callsign: str, job_id: int, get_data=True) -> return JobWrapper(response.payload) class JobSession: - def __init__(self, client: Client, bbs_callsign: str, default_timeout: int = 300, stutter: int = 1): + def __init__(self, client: Client, bbs_callsign: str, default_timeout: int = 300, stutter: int = 2): self.client = client self.bbs = bbs_callsign self.timeout = default_timeout self.stutter = stutter + self.job_log = [] def connect(self) -> PacketServerConnection: return self.client.new_connection(self.bbs) @@ -125,6 +126,7 @@ class JobSession: while not j.is_finished: time.sleep(self.stutter) j = self.get_id(jid) + self.job_log.append(j) return j