Skip to content

Commit 5255106

Browse files
authored
Merge pull request #3530 from OpenNeuroOrg/maintenance-fix
fix(worker): Match accession number only for dataset maintenance tasks
2 parents ca93267 + 64689e2 commit 5255106

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/datalad/datalad_service/tasks/maintenance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import logging
33
import subprocess
4+
import re
45
import random
56

67

@@ -23,7 +24,7 @@ def dataset_factory():
2324
os.path.join(DATALAD_DATASET_PATH, d)
2425
for d in os.listdir(DATALAD_DATASET_PATH)
2526
if os.path.isdir(os.path.join(DATALAD_DATASET_PATH, d))
26-
and d.startswith('ds')
27+
and re.match(r'^ds\d{6}$', d)
2728
]
2829
if not datasets:
2930
logging.warning(

0 commit comments

Comments
 (0)