brief-apartment-6992808/01/2019, 10:35 PM
Diagnostics: pulumi:pulumi:Stack (project-factory-prod): <coroutine object get_project at 0x7f761ffaf448> ./__main__.py:61: RuntimeWarning: coroutine 'get_project' was never awaited a.prj_create() RuntimeWarning: Enable tracemalloc to get the object allocation traceback
bitter-oil-4608108/02/2019, 2:00 AM
that you defined?
high-translator-2261408/02/2019, 2:19 AM
stuff is async based (coroutines)
Now, the weird thing is that this should still work, assuming the return value got handed to pulumi
async def get_project(self): return await gcp.organizations.get_project(project_id=self.project_name)
brief-apartment-6992808/02/2019, 5:35 PM
loop = asyncio.get_running_loop() proj_exist = loop.create_task(self.get_project()) print(proj_exist)
if proj_exist: `stop pulumi run`
high-translator-2261408/02/2019, 7:02 PM
bitter-oil-4608108/02/2019, 9:02 PM
methods complete synchronously: https://github.com/pulumi/pulumi/pull/3019 is the core work in our runtime to support this and we'll be pushing changes out to our providers over the next few days to consume this. Once this is complete, these calls should behave like you'd like.
high-translator-2261408/02/2019, 9:11 PM