pylantir 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
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.
- pylantir/redcap_to_db.py +5 -3
- {pylantir-0.1.0.dist-info → pylantir-0.1.2.dist-info}/METADATA +1 -1
- {pylantir-0.1.0.dist-info → pylantir-0.1.2.dist-info}/RECORD +6 -6
- {pylantir-0.1.0.dist-info → pylantir-0.1.2.dist-info}/WHEEL +0 -0
- {pylantir-0.1.0.dist-info → pylantir-0.1.2.dist-info}/entry_points.txt +0 -0
- {pylantir-0.1.0.dist-info → pylantir-0.1.2.dist-info}/licenses/LICENSE +0 -0
pylantir/redcap_to_db.py
CHANGED
|
@@ -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 +
|
|
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}.")
|
|
@@ -3,12 +3,12 @@ pylantir/db_setup.py,sha256=KTILsRrH7V5EaPqbCfOYYECM9mUB-AvOdjqjMM2H1n0,1333
|
|
|
3
3
|
pylantir/models.py,sha256=bKgI0EN1VSYanPTOvEhEY2Zzqa0gDYLpVnE_KNQ6PEc,1780
|
|
4
4
|
pylantir/mwl_server.py,sha256=GMJDcK0u_KM3oa6UqQ87NxMVye2pvG2cdkcI9k_iExg,10338
|
|
5
5
|
pylantir/populate_db.py,sha256=KIbkVA-EAuTlDArXMFOHkjMmVfjlsTApj7S1wpUu1bM,2207
|
|
6
|
-
pylantir/redcap_to_db.py,sha256=
|
|
6
|
+
pylantir/redcap_to_db.py,sha256=nHgZ-drWaZ29I7RNHZNot8wZRI2HANpCXCdoUWUeiPs,13442
|
|
7
7
|
pylantir/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
pylantir/cli/run.py,sha256=ZE-CIBTn3vp4APqs0U7wKW70RFM4ph-AuKkOrGbruu8,10321
|
|
9
9
|
pylantir/config/mwl_config.json,sha256=v14HXu1ft1mwFyjsowHe3H1LXZGD6sAoYuGb9_4w2kA,1008
|
|
10
|
-
pylantir-0.1.
|
|
11
|
-
pylantir-0.1.
|
|
12
|
-
pylantir-0.1.
|
|
13
|
-
pylantir-0.1.
|
|
14
|
-
pylantir-0.1.
|
|
10
|
+
pylantir-0.1.2.dist-info/entry_points.txt,sha256=vxaxvfGppLqRt9_4sqNDdP6b2jlgpcHIwP7UQfrM1T0,50
|
|
11
|
+
pylantir-0.1.2.dist-info/licenses/LICENSE,sha256=ws_MuBL-SCEBqPBFl9_FqZkaaydIJmxHrJG2parhU4M,1141
|
|
12
|
+
pylantir-0.1.2.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
13
|
+
pylantir-0.1.2.dist-info/METADATA,sha256=u0813w9nKYhpK8Jgn9ukNH5fvbei6n4veQFcTl5rJ9w,7585
|
|
14
|
+
pylantir-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|