commit
55c46bf2c3
|
|
@ -1050,6 +1050,15 @@ if is_on_ec2:
|
|||
return web.Response(status=200, content_type='application/json',
|
||||
body=json.dumps({"result": False, "message": f"name is required"}))
|
||||
name = json_data['name']
|
||||
|
||||
if name == 'default' or name == 'local':
|
||||
return web.Response(status=200, content_type='application/json',
|
||||
body=json.dumps({"result": False, "message": f"{name} is not allowed"}))
|
||||
|
||||
if os.getenv('WORKFLOW_NAME') == name:
|
||||
return web.Response(status=200, content_type='application/json',
|
||||
body=json.dumps({"result": False, "message": "can not delete current workflow"}))
|
||||
|
||||
data = {
|
||||
"workflow_name_list": [name],
|
||||
}
|
||||
|
|
@ -1058,7 +1067,7 @@ if is_on_ec2:
|
|||
print(response)
|
||||
|
||||
return web.Response(status=200, content_type='application/json',
|
||||
body=json.dumps({"result": True, "message": "success"}))
|
||||
body=json.dumps({"result": True, "message": "Workflow will be deleted soon"}))
|
||||
except Exception as e:
|
||||
logger.info(e)
|
||||
return web.Response(status=500, content_type='application/json',
|
||||
|
|
|
|||
|
|
@ -349,15 +349,13 @@ if [ -n "$ON_EC2" ]; then
|
|||
|
||||
cd /home/ubuntu/ComfyUI || exit 1
|
||||
|
||||
if [ "$WORKFLOW_NAME" = "default" ]; then
|
||||
if [ -f "/comfy_proxy.py" ]; then
|
||||
cp -f /comfy_proxy.py /home/ubuntu/ComfyUI/custom_nodes/
|
||||
fi
|
||||
if [ -f "/comfy_proxy.py" ]; then
|
||||
cp -f /comfy_proxy.py /home/ubuntu/ComfyUI/custom_nodes/
|
||||
fi
|
||||
|
||||
if [ -d "/ComfyUI-AWS-Extension" ]; then
|
||||
rm -rf /home/ubuntu/ComfyUI/custom_nodes/ComfyUI-AWS-Extension
|
||||
cp -r /ComfyUI-AWS-Extension /home/ubuntu/ComfyUI/custom_nodes/
|
||||
fi
|
||||
if [ -d "/ComfyUI-AWS-Extension" ]; then
|
||||
rm -rf /home/ubuntu/ComfyUI/custom_nodes/ComfyUI-AWS-Extension
|
||||
cp -r /ComfyUI-AWS-Extension /home/ubuntu/ComfyUI/custom_nodes/
|
||||
fi
|
||||
|
||||
rm -rf web/extensions/ComfyLiterals
|
||||
|
|
|
|||
Loading…
Reference in New Issue