summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cerbero/build/oven.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/cerbero/build/oven.py b/cerbero/build/oven.py
index 5f3155a4..75f9b72a 100644
--- a/cerbero/build/oven.py
+++ b/cerbero/build/oven.py
@@ -398,18 +398,20 @@ class Oven (object):
tasks.append(asyncio.ensure_future(cook_recipe_worker(default_queue, set(all_steps) - set(used_steps))))
async def recipes_done():
- async def heartbeat_output():
- while True:
- await asyncio.sleep(60)
- self._build_status_printer.heartbeat()
+ if hasattr(asyncio, 'create_task'):
+ async def heartbeat_output():
+ while True:
+ await asyncio.sleep(60)
+ self._build_status_printer.heartbeat()
- heartbeat_task = asyncio.create_task(heartbeat_output())
+ heartbeat_task = asyncio.create_task(heartbeat_output())
while built_recipes & recipe_targets != recipe_targets:
for q in queues.values():
await q.join()
- heartbeat_task.cancel()
+ if hasattr(asyncio, 'create_task'):
+ heartbeat_task.cancel()
# push the initial set of recipes that have no dependencies to start