mirror of
https://github.com/xcat2/confluent.git
synced 2026-08-03 16:07:00 +00:00
Do not block the import poll loop with time.sleep
osimport polls import progress from a coroutine, so a blocking sleep between reads stalls the whole client loop. It was the only use of time in the script, so the import goes with it.
This commit is contained in:
@@ -10,7 +10,6 @@ import os.path
|
||||
import pwd
|
||||
import shutil
|
||||
import sys
|
||||
import time
|
||||
|
||||
path = os.path.dirname(os.path.realpath(__file__))
|
||||
path = os.path.realpath(os.path.join(path, '..', 'lib', 'python'))
|
||||
@@ -597,7 +596,7 @@ async def osimport(imagefile, checkonly=False, custname=None):
|
||||
sys.stdout.flush()
|
||||
else:
|
||||
print(repr(rsp))
|
||||
time.sleep(0.5)
|
||||
await asyncio.sleep(0.5)
|
||||
finally:
|
||||
if shortname:
|
||||
async for x in c.delete('/deployment/importing/{0}'.format(shortname)):
|
||||
|
||||
Reference in New Issue
Block a user