+11
-4
@@ -2229,9 +2229,9 @@ def background_booking_provisioning(
|
||||
address,
|
||||
price,
|
||||
software_name="Invario Inventarsystem",
|
||||
is_trial=False,
|
||||
trial_days=14,
|
||||
trial_prefix="testversion-"
|
||||
is_trial=False, # Neu: Flag für Testversion
|
||||
trial_days=14, # Neu: Laufzeit der Testversion in Tagen
|
||||
trial_prefix="testversion-" # Neu: Präfix für Testversionen
|
||||
):
|
||||
"""
|
||||
Hintergrund-Worker, der die Tenant-Bereitstellung über das Host-Watcher-Triggersystem auslöst.
|
||||
@@ -2240,7 +2240,12 @@ def background_booking_provisioning(
|
||||
with app_instance.app_context():
|
||||
req_client, req_col = _get_collection("instance_requests")
|
||||
try:
|
||||
# 1. Präfix für Testversionen verarbeiten
|
||||
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
|
||||
req_col.update_one(
|
||||
{"_id": ObjectId(prov_id)},
|
||||
@@ -2283,7 +2288,9 @@ def background_booking_provisioning(
|
||||
"request_id": str(prov_id),
|
||||
"slug": effective_subdomain,
|
||||
"port": next_port,
|
||||
"days": trial_days
|
||||
"days": trial_days,
|
||||
"password": admin_password,
|
||||
"module_config": module_config_str
|
||||
}
|
||||
else:
|
||||
trigger_payload = {
|
||||
|
||||
Reference in New Issue
Block a user