Skip to content

Commit 1567487

Browse files
authored
Merge pull request #1097 from simonsobs/update_obsdb_known_bad_books
update_obsdb: new known_bad_books list in config file
2 parents c9db396 + 5040f3e commit 1567487

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sotodlib/site_pipeline/update_obsdb.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
lat_tube_list_file: path to yaml dict matching tubes and bands
2121
tolerate_stray_files: True
2222
skip_bad_books: True
23+
known_bad_books:
24+
- oper_1736874485_satp3_0000100
25+
- obs_9999999999_satp0_1111111
2326
extra_extra_files:
2427
- Z_bookbinder_log.txt
2528
extra_files:
@@ -150,6 +153,8 @@ def main(config: str,
150153
bookcartobsdb.add_obs_columns(col_list)
151154
if "skip_bad_books" not in config_dict:
152155
config_dict["skip_bad_books"] = False
156+
if "known_bad_books" not in config_dict:
157+
config_dict["known_bad_books"] = []
153158

154159
#How far back we should look
155160
tnow = time.time()
@@ -177,6 +182,9 @@ def main(config: str,
177182
_, book_id = os.path.split(dirpath)
178183
if book_id in existing and not overwrite:
179184
continue
185+
if book_id in config_dict["known_bad_books"]:
186+
logger.debug(f"{book_id} known to be bad, skipping it")
187+
continue
180188
found_timestamp = re.search(r"\d{10}", book_id)#Find the rough timestamp
181189
if found_timestamp and int(found_timestamp.group())>tback:
182190
#Looks like a book folder and young enough

0 commit comments

Comments
 (0)