reload_server —git

This commit is contained in:
曹前明 2022-06-24 01:12:08 +08:00
parent 95617d422d
commit ef1b6c5649
1 changed files with 5 additions and 2 deletions

View File

@ -25,8 +25,11 @@ def backup_database():
@shared_task
def reload_server_git():
command = 'bash {}/git_server.sh'.format(SH_PATH)
subprocess.run(command, shell=True, capture_output=True, text=True)
# return completed
completed = subprocess.run(command, shell=True, capture_output=True, text=True)
if completed.returncode == 0:
return
else:
raise completed.stdout
@shared_task