mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-02-12 13:01:51 +00:00
Merge pull request #165 from ComputerScienceHouse/willnilges/fix-vmid-crash
Fix vnc target redis crash
This commit is contained in:
commit
4f7655ca6b
2 changed files with 5 additions and 2 deletions
|
@ -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 8081:8081 --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 8001:8001 --env-file=HACKING/.env --entrypoint='["gunicorn", "proxstar:app", "--bind=0.0.0.0:8000"]' proxstar
|
||||
|
|
|
@ -254,7 +254,10 @@ def vm_power(vmid, action):
|
|||
vm = VM(vmid)
|
||||
vnc_token_key = f'vnc_token|{vmid}'
|
||||
# For deleting the token from redis later
|
||||
vnc_token = redis_conn.get(vnc_token_key).decode('utf-8')
|
||||
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}')
|
||||
if action == 'start':
|
||||
vmconfig = vm.config
|
||||
usage_check = user.check_usage(vmconfig['cores'], vmconfig['memory'], 0)
|
||||
|
|
Loading…
Reference in a new issue