mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Compute md5sum on thread and don't block main server, Ref. gui#2239
This commit is contained in:
1 parent
3c5ca9ce0e
commit
6868e20a70
2 files changed
+2
-2
No files matched your search
@@ -557,7 +557,7 @@ class BaseManager:
|
||||
f.write(packet)
|
||||
os.chmod(tmp_path, stat.S_IWRITE | stat.S_IREAD | stat.S_IEXEC)
|
||||
shutil.move(tmp_path, path)
|
||||
md5sum(path)
|
||||
yield from wait_run_in_executor(md5sum, path)
|
||||
except OSError as e:
|
||||
raise aiohttp.web.HTTPConflict(text="Could not write image: {} because {}".format(filename, e))
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import gns3server
|
||||
import subprocess
|
||||
|
||||
from gns3server.utils import parse_version
|
||||
from gns3server.utils.asyncio import subprocess_check_output
|
||||
from gns3server.utils.asyncio import subprocess_check_output, wait_run_in_executor
|
||||
from .qemu_error import QemuError
|
||||
from ..adapters.ethernet_adapter import EthernetAdapter
|
||||
from ..nios.nio_udp import NIOUDP
|
||||
|
||||
Reference in new issue
Block a user