changes to the module selection

This commit is contained in:
2026-09-06 21:34:58 +02:00
parent 608759c0f9
commit 0853de417a
+4 -11
View File
@@ -2229,9 +2229,9 @@ def background_booking_provisioning(
address, address,
price, price,
software_name="Invario Inventarsystem", software_name="Invario Inventarsystem",
is_trial=False, # Neu: Flag für Testversion is_trial=False,
trial_days=14, # Neu: Laufzeit der Testversion in Tagen trial_days=14,
trial_prefix="testversion-" # Neu: Präfix für Testversionen trial_prefix="testversion-"
): ):
""" """
Hintergrund-Worker, der die Tenant-Bereitstellung über das Host-Watcher-Triggersystem auslöst. Hintergrund-Worker, der die Tenant-Bereitstellung über das Host-Watcher-Triggersystem auslöst.
@@ -2240,12 +2240,7 @@ def background_booking_provisioning(
with app_instance.app_context(): with app_instance.app_context():
req_client, req_col = _get_collection("instance_requests") req_client, req_col = _get_collection("instance_requests")
try: try:
# 1. Präfix für Testversionen verarbeiten
effective_subdomain = subdomain effective_subdomain = subdomain
if is_trial:
if not effective_subdomain.startswith(trial_prefix):
effective_subdomain = f"{trial_prefix}{effective_subdomain}"
# 2. Status auf "in_progress" setzen # 2. Status auf "in_progress" setzen
req_col.update_one( req_col.update_one(
{"_id": ObjectId(prov_id)}, {"_id": ObjectId(prov_id)},
@@ -2288,9 +2283,7 @@ def background_booking_provisioning(
"request_id": str(prov_id), "request_id": str(prov_id),
"slug": effective_subdomain, "slug": effective_subdomain,
"port": next_port, "port": next_port,
"days": trial_days, "days": trial_days
"password": admin_password,
"module_config": module_config_str
} }
else: else:
trigger_payload = { trigger_payload = {