Skip to content

Commit

Permalink
Merge pull request #144 from DARPA-ASKEM/get-model-configuration-afte…
Browse files Browse the repository at this point in the history
…r-execute

Model Configuration post_exec function
  • Loading branch information
blanchco authored Jul 22, 2024
2 parents f4ce2b5 + f0744b1 commit 653942a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/askem_beaker/contexts/model_configuration/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ async def load_config(self):
print(f"Running command:\n-------\n{command}\n---------")
await self.execute(command)

async def post_execute(self, message):
content = (await self.evaluate(self.get_code("get_config")))["return"]
self.beaker_kernel.send_response(
"iopub", "model_configuration_preview", content, parent_header=message.parent_header
)

@intercept()
async def save_model_config_request(self, message):
'''
Expand Down

0 comments on commit 653942a

Please sign in to comment.