mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-24 18:30:23 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
c82038cfd1
@ -1,5 +1,5 @@
|
|||||||
import os, io, sys, platform, shutil, time, json, datetime
|
import os, io, sys, platform, shutil, time, json, datetime
|
||||||
import re
|
import re,docker
|
||||||
from api.utils import shell_execute
|
from api.utils import shell_execute
|
||||||
from api.utils import network
|
from api.utils import network
|
||||||
|
|
||||||
@ -10,6 +10,10 @@ from pathlib import Path
|
|||||||
def get_process_perc(app_name):
|
def get_process_perc(app_name):
|
||||||
|
|
||||||
process_now = "0%"
|
process_now = "0%"
|
||||||
|
client = docker.from_env()
|
||||||
|
resp = client.api.pull(app_name, stream=True, decode=True)
|
||||||
|
for line in resp:
|
||||||
|
print(json.dumps(line, indent=4))
|
||||||
|
|
||||||
return process_now
|
return process_now
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user