From 9209a5d46a3e346f7a36aaa9c99b7b7cf27d2dff Mon Sep 17 00:00:00 2001 From: Ben White Date: Wed, 17 Jan 2024 18:25:20 +0100 Subject: [PATCH] fix: Revert short circuit (#19817) --- ee/tasks/subscriptions/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ee/tasks/subscriptions/__init__.py b/ee/tasks/subscriptions/__init__.py index 70f9b474d2a5b..443e5eb369995 100644 --- a/ee/tasks/subscriptions/__init__.py +++ b/ee/tasks/subscriptions/__init__.py @@ -1,7 +1,6 @@ from datetime import datetime, timedelta from typing import Optional -from django.conf import settings import structlog from prometheus_client import Counter from sentry_sdk import capture_exception, capture_message @@ -149,14 +148,12 @@ def schedule_all_subscriptions() -> None: report_timeout_seconds = settings.PARALLEL_ASSET_GENERATION_MAX_TIMEOUT_MINUTES * 60 * 1.5 -@app.task(soft_time_limit=report_timeout_seconds, timeout=report_timeout_seconds + 10) +@app.task(soft_time_limit=report_timeout_seconds, time_limit=report_timeout_seconds + 10) def deliver_subscription_report(subscription_id: int) -> None: - if not settings.TEST: - return return _deliver_subscription_report(subscription_id) -@app.task(soft_time_limit=30, time_limit=40) +@app.task(soft_time_limit=report_timeout_seconds, time_limit=report_timeout_seconds + 10) def handle_subscription_value_change( subscription_id: int, previous_value: str, invite_message: Optional[str] = None ) -> None: