aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/quantifi_upload_status.py1
-rw-r--r--python/report_ops/status.py20
2 files changed, 9 insertions, 12 deletions
diff --git a/python/quantifi_upload_status.py b/python/quantifi_upload_status.py
index fea00e5c..54011c0d 100644
--- a/python/quantifi_upload_status.py
+++ b/python/quantifi_upload_status.py
@@ -24,6 +24,7 @@ def close_and_reconnect():
def run():
+ QuantifiRemote.init_client()
while True:
try:
for f in QuantifiRemote._client.list_files("/OUTGOING/Status"):
diff --git a/python/report_ops/status.py b/python/report_ops/status.py
index d408c2c1..f012578c 100644
--- a/python/report_ops/status.py
+++ b/python/report_ops/status.py
@@ -16,12 +16,6 @@ from .utils import QuantifiMonitor
class Remote:
_client: ClassVar
- def __init_subclass__(self, client_name, folder=None):
- self.client_name = client_name
- if folder:
- self.folder = folder
- self.init_client()
-
@classmethod
def check_cache(cls):
if cls.process.cache_info().currsize == cls.process.cache_info().maxsize:
@@ -31,10 +25,10 @@ class Remote:
)
@classmethod
- def init_client(cls):
- cls._client = Client.from_creds(cls.client_name)
- if cls.folder:
- cls._client.client.cwd(cls.folder)
+ def init_client(cls, client_name, folder=None):
+ cls._client = Client.from_creds(client_name)
+ if folder:
+ cls._client.client.cwd(folder)
@dataclass
@@ -43,8 +37,6 @@ class QuantifiRemote(
Remote,
deal_type=None,
table_name="quantifi_submission",
- client_name="quantifi",
- folder="/OUTGOING/status",
):
uploadtime: datetime
filename: str
@@ -85,6 +77,10 @@ class QuantifiRemote(
finally:
item._insert_queue.clear()
+ @classmethod
+ def init_client(cls):
+ super().init_client("quantifi", "/OUTGOING/status")
+
@staticmethod
def extract_ts(filename):
timestamp = re.search(