diff --git a/HACKING/launch_env.sh b/HACKING/launch_env.sh index e731503..63e49b4 100755 --- a/HACKING/launch_env.sh +++ b/HACKING/launch_env.sh @@ -3,4 +3,4 @@ podman run --rm -d --network=proxstar --name=proxstar-redis redis:alpine podman run --rm -d --network=proxstar --name=proxstar-postgres -e POSTGRES_PASSWORD=changeme -v ./HACKING/proxstar-postgres/volume:/var/lib/postgresql/data:Z proxstar-postgres podman run --rm -d --network=proxstar --name=proxstar-rq-scheduler --env-file=HACKING/.env --entrypoint ./start_scheduler.sh proxstar podman run --rm -d --network=proxstar --name=proxstar-rq --env-file=HACKING/.env --entrypoint ./start_worker.sh proxstar -podman run --rm -it --network=proxstar --name=proxstar -p 8000:8000 -p 8001:8001 --env-file=HACKING/.env --entrypoint='["gunicorn", "proxstar:app", "--bind=0.0.0.0:8000"]' proxstar +podman run --rm -it --network=proxstar --name=proxstar -p 8000:8000 -p 8081:8081 --env-file=HACKING/.env --entrypoint='["gunicorn", "proxstar:app", "--bind=0.0.0.0:8000"]' proxstar \ No newline at end of file diff --git a/proxstar/__init__.py b/proxstar/__init__.py index 2d6787e..4fd552c 100644 --- a/proxstar/__init__.py +++ b/proxstar/__init__.py @@ -254,10 +254,7 @@ def vm_power(vmid, action): vm = VM(vmid) vnc_token_key = f'vnc_token|{vmid}' # For deleting the token from redis later - try: - vnc_token = redis_conn.get(vnc_token_key).decode('utf-8') - except AttributeError as e: - print(f'Error: Could not get vnc_token:{e}') + vnc_token = redis_conn.get(vnc_token_key).decode('utf-8') if action == 'start': vmconfig = vm.config usage_check = user.check_usage(vmconfig['cores'], vmconfig['memory'], 0)