import asyncio import aiohttp import importlib import tasks_from_server import subprocess taskids={} def install_eclipse(): print('install eclipse part 3') def install_sql(): print('install sql part 3') async def hello_task(): print('in hello task') while True: async with aiohttp.ClientSession() as session: data = {'HOST': 'USMUMVMANAKKAL1', 'USER': 'vyshak', 'CURRENT_VERSION': 1, 'REQUESTED_VERSION': 1} async with session.get('http://localhost:5000/test', params=data) as resp: k = await resp.text() print('inside hello') print(k) await asyncio.sleep(10) async def torun(loop): print('start run') #taskids['hellotaskid'].cancel() loop.create_task(hello_task()) print('end run')