Revert "Fix vnc target redis crash"

This commit is contained in:
Willard Nilges 2022-08-31 20:40:12 -04:00 committed by GitHub
parent 4f7655ca6b
commit b90df9a7a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View file

@ -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

View file

@ -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)