mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 23:50:31 +00:00
Update manage.py
This commit is contained in:
parent
2a1d017f0c
commit
7fb5ca6694
1 changed files with 15 additions and 0 deletions
|
@ -27,10 +27,25 @@ redis_conn = Redis(host='websoft9-redis', port=6379)
|
|||
# 使用指定的 Redis 连接创建 RQ 队列
|
||||
q = Queue(connection=redis_conn,default_timeout=3600)
|
||||
|
||||
# APP列表是否有正在安装的应用
|
||||
def check_list_status(applist):
|
||||
installing = False
|
||||
for app in applist:
|
||||
status = app['status']
|
||||
if status == "created":
|
||||
installing = True
|
||||
break
|
||||
return installing
|
||||
|
||||
# 获取所有app的信息
|
||||
def get_my_app(app_id):
|
||||
installed_list = get_apps_from_compose()
|
||||
installing_list = get_apps_from_queue()
|
||||
|
||||
if check_list_status(installed_list):
|
||||
time.sleep(3)
|
||||
installed_list = get_apps_from_compose()
|
||||
|
||||
app_list = installing_list + installed_list
|
||||
find = False
|
||||
ret = {}
|
||||
|
|
Loading…
Reference in a new issue