From ea5b7771ec4b5bc45c0c0a278241fe21d5ec9c2f Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Sun, 4 Aug 2024 15:43:02 +0200 Subject: [PATCH] switch from 7 to 30 days of free trial --- app/cron_pocketbase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/cron_pocketbase.py b/app/cron_pocketbase.py index 65bd471..fc7004e 100644 --- a/app/cron_pocketbase.py +++ b/app/cron_pocketbase.py @@ -13,7 +13,7 @@ admin_data = pb.admins.auth_with_password(pb_admin_email, pb_password) now = datetime.now() -seven_days_ago = now - timedelta(days=7) +one_month_ago = now - timedelta(days=30) async def update_free_trial(): @@ -22,8 +22,8 @@ async def update_free_trial(): for item in data: created_date = item.created - # Check if the created date is more than 7 days ago - if created_date < seven_days_ago: + # Check if the created date is more than N days ago + if created_date < one_month_ago: # Update the user record pb.collection("users").update(item.id, { "tier": 'Free',