Skip to content

Commit 5cf0aa4

Browse files
committed
more logger statements
1 parent 8faacef commit 5cf0aa4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

atomate/qchem/firetasks/parse_outputs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ def run_task(self, fw_spec):
226226
else:
227227
logger.info("Connecting to QChemCalcDb")
228228
mmdb = QChemCalcDb.from_db_file(db_file, admin=True)
229+
logger.info("Starting task_doc insert")
229230
t_id = mmdb.insert(task_doc)
230231
logger.info(f"Finished parsing with task_id: {t_id}")
231232

atomate/utils/database.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,14 @@ def insert(self, d, update_duplicates=True):
133133
d (dict): task document
134134
update_duplicates (bool): whether to update the duplicates
135135
"""
136+
logger.info("Executing find_one to check for duplicate")
136137
result = self.collection.find_one(
137138
{"dir_name": d["dir_name"]}, ["dir_name", "task_id"]
138139
)
139140
if result is None or update_duplicates:
140141
d["last_updated"] = datetime.datetime.utcnow()
141142
if result is None:
143+
logger.info("No duplicate!")
142144
if ("task_id" not in d) or (not d["task_id"]):
143145
d["task_id"] = self.db.counter.find_one_and_update(
144146
{"_id": "taskid"},

0 commit comments

Comments
 (0)