Unverified Commit f87b7f6b authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

symphony/runner: add synchronous main() for entrypoint

parent 17d771b8
...@@ -42,7 +42,7 @@ async def run_instantiation(inst: inst_base.Instantiation) -> dict: ...@@ -42,7 +42,7 @@ async def run_instantiation(inst: inst_base.Instantiation) -> dict:
return output.__dict__ return output.__dict__
async def main(): async def amain():
base_client = client.BaseClient(base_url="http://0.0.0.0:8000") base_client = client.BaseClient(base_url="http://0.0.0.0:8000")
namespace_client = client.NSClient(base_client=base_client, namespace="foo/bar/baz") namespace_client = client.NSClient(base_client=base_client, namespace="foo/bar/baz")
sb_client = client.SimBricksClient(namespace_client) sb_client = client.SimBricksClient(namespace_client)
...@@ -76,5 +76,8 @@ async def main(): ...@@ -76,5 +76,8 @@ async def main():
await rc.update_run(run_obj['id'], 'completed', json.dumps(out)) await rc.update_run(run_obj['id'], 'completed', json.dumps(out))
def main():
asyncio.run(amain())
if __name__ == "__main__": if __name__ == "__main__":
asyncio.run(main()) main()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment