diff --git a/backend/src/baserow/config/settings/base.py b/backend/src/baserow/config/settings/base.py index 08691cabf9..2bce9afb50 100644 --- a/backend/src/baserow/config/settings/base.py +++ b/backend/src/baserow/config/settings/base.py @@ -180,8 +180,10 @@ "baserow.contrib.database.table.tasks.run_row_count_job": {"queue": "export"}, "baserow.core.jobs.tasks.clean_up_jobs": {"queue": "export"}, } -CELERY_TASK_SOFT_TIME_LIMIT = 60 * 5 # 5 minutes -CELERY_TASK_TIME_LIMIT = CELERY_TASK_SOFT_TIME_LIMIT + 60 # 60 seconds +CELERY_TASK_SOFT_TIME_LIMIT = int( + os.getenv("CELERY_TASK_SOFT_TIME_LIMIT") or 60 * 5 +) # default 5 minutes +CELERY_TASK_TIME_LIMIT = CELERY_TASK_SOFT_TIME_LIMIT + 60 # default 6 minutes CELERY_REDBEAT_REDIS_URL = REDIS_URL # Explicitly set the same value as the default loop interval here so we can use it diff --git a/backend/src/baserow/core/notifications/tasks.py b/backend/src/baserow/core/notifications/tasks.py index 5422126d05..6e72672306 100644 --- a/backend/src/baserow/core/notifications/tasks.py +++ b/backend/src/baserow/core/notifications/tasks.py @@ -113,7 +113,8 @@ def beat_send_instant_notifications_summary_by_email(self): bind=True, queue="export", raise_on_duplicate=True, - lock_expiry=60 * 5, + lock_expiry=settings.CELERY_TASK_TIME_LIMIT * 2, + time_limit=settings.CELERY_TASK_TIME_LIMIT * 2, ) def singleton_send_instant_notifications_summary_by_email(self): send_instant_notifications_email_to_users() diff --git a/web-frontend/modules/builder/pages/publicPage.vue b/web-frontend/modules/builder/pages/publicPage.vue index e52012f4d1..2ac0e54d9a 100644 --- a/web-frontend/modules/builder/pages/publicPage.vue +++ b/web-frontend/modules/builder/pages/publicPage.vue @@ -303,7 +303,11 @@ const { data: asyncDataResult, error } = await useAsyncData( if (error.value) { // If we have an error we want to display it. - throw error.value + if (error.value.statusCode === 404) { + showError(error.value) + } else { + throw error.value + } } const workspace = computed(() => asyncDataResult.value.workspace)