From 0f733ba5743c40d95bdc34d10e8195b57a1c60ec Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Sat, 27 Jul 2024 23:19:22 +0200 Subject: [PATCH] update cron job --- app/cron_reddit_statistics.py | 6 ++++++ app/primary_cron_job.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/cron_reddit_statistics.py b/app/cron_reddit_statistics.py index 9c26f7a..a67e4c7 100644 --- a/app/cron_reddit_statistics.py +++ b/app/cron_reddit_statistics.py @@ -37,6 +37,12 @@ user_agent=user_agent ) +# Get subscriber count and active user count +#subreddit = reddit.subreddit("wallstreetbets") +#subscriber_count = subreddit.subscribers +#active_user_count = subreddit.active_user_count + + # Function to save data def save_data(data, filename): with open(f'json/reddit-tracker/wallstreetbets/{filename}', 'w', encoding='utf-8') as f: diff --git a/app/primary_cron_job.py b/app/primary_cron_job.py index a14e4e0..3fea513 100755 --- a/app/primary_cron_job.py +++ b/app/primary_cron_job.py @@ -473,7 +473,7 @@ def run_threaded(job_func): schedule.every(10).minutes.do(run_threaded, run_one_day_price).tag('one_day_price_job') schedule.every(15).minutes.do(run_threaded, run_cron_heatmap).tag('heatmap_job') -schedule.every(30).minutes.do(run_threaded, run_reddit_tracker).tag('reddit_tracker_job') +schedule.every(10).minutes.do(run_threaded, run_reddit_tracker).tag('reddit_tracker_job') schedule.every(1).minutes.do(run_threaded, run_cron_quote).tag('quote_job')