mirror of
https://github.com/ComputerScienceHouse/proxstar.git
synced 2025-03-09 15:40:09 +00:00
add hourly cleanup of vnc pipelines
This commit is contained in:
parent
7166650a4a
commit
e5e54d1239
4 changed files with 19 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import requests
|
||||
import paramiko
|
||||
from flask import Flask
|
||||
from sqlalchemy import create_engine
|
||||
|
@ -161,3 +162,10 @@ def setup_template(template_id, name, user, password, cores, memory):
|
|||
exit_status = stdout.channel.recv_exit_status()
|
||||
client.close()
|
||||
print("[{}] Template successfully provisioned.".format(name))
|
||||
|
||||
|
||||
def cleanup_vnc_task():
|
||||
requests.post(
|
||||
'https://proxstar.csh.rit.edu/console/cleanup',
|
||||
data={'token': app.config['VNC_CLEANUP_TOKEN']},
|
||||
verify=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue