From 9ff11f4f09295df778d1479ed5ceaeeeda953b13 Mon Sep 17 00:00:00 2001 From: ruuushhh Date: Fri, 20 Oct 2023 12:23:49 +0530 Subject: [PATCH] Set email notification to 24 hours by default --- apps/workspaces/tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/workspaces/tasks.py b/apps/workspaces/tasks.py index 3a5c3caf..978e244a 100644 --- a/apps/workspaces/tasks.py +++ b/apps/workspaces/tasks.py @@ -21,14 +21,14 @@ from apps.workspaces.models import User, Workspace, WorkspaceSchedule, Configuration, FyleCredential -def schedule_email_notification(workspace_id: int, schedule_enabled: bool, hours: int): +def schedule_email_notification(workspace_id: int, schedule_enabled: bool): if schedule_enabled: schedule, _ = Schedule.objects.update_or_create( func='apps.workspaces.tasks.run_email_notification', args='{}'.format(workspace_id), defaults={ 'schedule_type': Schedule.MINUTES, - 'minutes': hours * 60, + 'minutes': 24 * 60, 'next_run': datetime.now() + timedelta(minutes=10) } ) @@ -46,7 +46,7 @@ def schedule_sync(workspace_id: int, schedule_enabled: bool, hours: int, email_a workspace_id=workspace_id ) - schedule_email_notification(workspace_id=workspace_id, schedule_enabled=schedule_enabled, hours=hours) + schedule_email_notification(workspace_id=workspace_id, schedule_enabled=schedule_enabled) if schedule_enabled: ws_schedule.enabled = schedule_enabled