update worker versioning and settings for cluster compatibility

This commit is contained in:
Eduardo Silva
2026-01-14 09:21:08 -03:00
parent 1b09eca24e
commit 01f192f91a
4 changed files with 8 additions and 5 deletions

View File

@@ -33,7 +33,6 @@ def get_cluster_settings():
def get_worker(request):
min_worker_version = 1
success = True
ip_address = get_ip_address(request)
token = request.GET.get('token', '')
@@ -56,7 +55,7 @@ def get_worker(request):
worker.error_status = ''
worker.save()
if worker_version < min_worker_version:
if worker_version < settings.CLUSTER_WORKER_MINIMUM_VERSION:
worker.error_status = 'update_required'
worker.save()
return worker, False

View File

@@ -1,3 +1,4 @@
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404, redirect, render
@@ -21,7 +22,7 @@ def cluster_main(request):
context = {
'page_title': page_title,
'workers': workers,
'current_worker_version': 10,
'current_worker_version': settings.CLUSTER_WORKER_CURRENT_VERSION,
'cluster_settings': cluster_settings
}
return render(request, 'cluster/workers_list.html', context)