mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Feature/112 api version (#119)
* Add api_version to status api and server_proxy.py * Add api_version to Zeroconf and filter out incompatible versions when finding available servers * Filter incompatible versions from the UI
This commit is contained in:
@@ -25,11 +25,13 @@ from src.utilities.config import Config
|
||||
from src.utilities.misc_helper import system_safe_path, current_system_os, current_system_cpu, \
|
||||
current_system_os_version, num_to_alphanumeric
|
||||
from src.utilities.status_utils import string_to_status
|
||||
from version import APP_VERSION
|
||||
|
||||
logger = logging.getLogger()
|
||||
server = Flask(__name__)
|
||||
ssl._create_default_https_context = ssl._create_unverified_context # disable SSL for downloads
|
||||
|
||||
API_VERSION = "1"
|
||||
|
||||
def start_server(hostname=None):
|
||||
|
||||
@@ -236,7 +238,9 @@ def status():
|
||||
"memory_percent": psutil.virtual_memory().percent,
|
||||
"job_counts": RenderQueue.job_counts(),
|
||||
"hostname": server.config['HOSTNAME'],
|
||||
"port": server.config['PORT']
|
||||
"port": server.config['PORT'],
|
||||
"app_version": APP_VERSION,
|
||||
"api_version": API_VERSION
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user