pylantir 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pylantir
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Python - DICOM Modality WorkList
5
5
  Author-email: Milton Camacho <miltoncamachoicc@gmail.com>
6
6
  Requires-Python: >=3.11.1
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "pylantir"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  authors = [
9
9
  {name = "Milton Camacho", email = "miltoncamachoicc@gmail.com"},
10
10
  ]
@@ -63,7 +63,9 @@ def fetch_redcap_entries(redcap_fields: list, interval: float) -> list:
63
63
  mri_rows = group[
64
64
  (group["redcap_repeat_instrument"] == "mri") &
65
65
  (group.get("mri_instance").notna()) &
66
- (group.get("mri_instance") != "")
66
+ (group.get("mri_instance") != "" ) &
67
+ (group.get("mri_date").notna()) &
68
+ (group.get("mri_time").notna())
67
69
  ]
68
70
 
69
71
  for _, mri_row in mri_rows.iterrows():
@@ -239,7 +241,7 @@ def sync_redcap_to_db_repeatedly(
239
241
 
240
242
  # last_sync_date = datetime.now().date()
241
243
  last_sync_date = datetime.now().date() - timedelta(days=1)
242
- interval_sync = interval + 600 # add 10 minutes to the interval to overlap with the previous sync and avoid missing data
244
+ interval_sync = interval + 300 # add 5 minutes to the interval to overlap with the previous sync and avoid missing data
243
245
 
244
246
  while not STOP_EVENT.is_set():
245
247
  # === 1) BASELINE: set defaults for flags and wait-time each iteration ===
@@ -269,7 +271,7 @@ def sync_redcap_to_db_repeatedly(
269
271
  logging.info(f"Using extended interval: {extended_interval}, {interval} seconds until next sync.")
270
272
  else:
271
273
  # Either not first run, or last_sync_date is None (this is first-ever run)
272
- logging.info("Using default interval {interval} seconds.")
274
+ logging.info(f"Using default interval {interval} seconds.")
273
275
 
274
276
  # --- CALL THE SYNC FUNCTION INSIDE A TRY/EXCEPT ---
275
277
  logging.debug(f"Syncing REDCap to DB for site {site_id} at {now_time}.")
File without changes
File without changes