Skip to content

Commit

Permalink
-fix addr
Browse files Browse the repository at this point in the history
-catch other exceptions in outputs
  • Loading branch information
nick-harder committed Sep 26, 2023
1 parent 39227eb commit 3878b90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion assume/common/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,10 @@ async def on_stop(self):
for query in queries:
try:
df = pd.read_sql(query, self.db)
except Exception as e:
except (OperationalError, ProgrammingError):
continue
except Exception as e:
raise e

Check warning on line 363 in assume/common/outputs.py

View check run for this annotation

Codecov / codecov/patch

assume/common/outputs.py#L362-L363

Added lines #L362 - L363 were not covered by tests

dfs.append(df)

Expand Down
2 changes: 1 addition & 1 deletion assume/common/units_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def write_learning_to_output(self, start: datetime, marketconfig: MarketConfig):
) or self.context.data_dict.get("output_agent_id")
db_addr = self.context.data_dict.get(
"learning_output_agent_addr"
) or self.context.data_dict.get("output_agent_id")
) or self.context.data_dict.get("output_agent_addr")

if db_aid and db_addr:
self.context.schedule_instant_acl_message(
Expand Down

0 comments on commit 3878b90

Please sign in to comment.