disable background job while updating nvidia driver on HiveOS
This commit is contained in:
parent
b54bd78a45
commit
4f1807e3ab
|
@ -1,5 +1,6 @@
|
||||||
from lib import config as config_module
|
from lib import config as config_module
|
||||||
from lib import docker_interface
|
from lib import docker_interface
|
||||||
|
from lib import background_job
|
||||||
from lib import utils
|
from lib import utils
|
||||||
import asyncio
|
import asyncio
|
||||||
import aiofiles
|
import aiofiles
|
||||||
|
@ -41,7 +42,9 @@ async def run_update(is_hive = False):
|
||||||
break
|
break
|
||||||
if not order_running:
|
if not order_running:
|
||||||
if is_hive:
|
if is_hive:
|
||||||
|
background_job.temporarly_disable(14400)
|
||||||
driver_update_code, driver_update_stdout, driver_update_stderr = await utils.async_run_command("nvidia-driver-update http://45.12.132.34/NVIDIA-Linux-x86_64-550.135.run --force", 14400, non_interactive_env_hive)
|
driver_update_code, driver_update_stdout, driver_update_stderr = await utils.async_run_command("nvidia-driver-update http://45.12.132.34/NVIDIA-Linux-x86_64-550.135.run --force", 14400, non_interactive_env_hive)
|
||||||
|
background_job.enable()
|
||||||
if driver_update_code == 0:
|
if driver_update_code == 0:
|
||||||
async with aiofiles.open(config.restart_docker_flag_file, mode='w') as file:
|
async with aiofiles.open(config.restart_docker_flag_file, mode='w') as file:
|
||||||
await file.write("")
|
await file.write("")
|
||||||
|
|
Loading…
Reference in New Issue