Zelyanoth commited on
Commit
78b0b47
·
1 Parent(s): 026b511
backend/celery_tasks/__init__.py CHANGED
@@ -1,6 +1 @@
1
- # Initialize the celery_tasks package
2
- from . import content_tasks
3
- from . import schedule_loader
4
-
5
- # This ensures that the tasks are registered with Celery
6
- __all__ = ['content_tasks', 'schedule_loader']
 
1
+ # Initialize the celery_tasks package
 
 
 
 
 
backend/celery_tasks/schedule_loader.py CHANGED
@@ -142,11 +142,12 @@ def load_schedules_task(self):
142
  )
143
  print(f"[CELERY BEAT] Creating content task - ID: {gen_job_id}")
144
  print(f"[CELERY BEAT] Content task schedule: minute={content_gen_time['minute']}, hour={content_gen_time['hour']}, day_of_week={content_gen_time['day_of_week']}")
145
- print(f"[CELERY BEAT] Content task args: {(
146
  schedule.get('Social_network', {}).get('id_utilisateur'),
147
  schedule_id,
148
  supabase_config
149
- )}")
 
150
  new_schedule[gen_job_id] = {
151
  'task': 'backend.celery_tasks.content_tasks.generate_content_task',
152
  'schedule': task_schedule,
@@ -168,10 +169,11 @@ def load_schedules_task(self):
168
  )
169
  print(f"[CELERY BEAT] Creating publish task - ID: {pub_job_id}")
170
  print(f"[CELERY BEAT] Publish task schedule: minute={publish_time['minute']}, hour={publish_time['hour']}, day_of_week={publish_time['day_of_week']}")
171
- print(f"[CELERY BEAT] Publish task args: {(
172
  schedule_id,
173
  supabase_config
174
- )}")
 
175
  new_schedule[pub_job_id] = {
176
  'task': 'backend.celery_tasks.content_tasks.publish_post_task',
177
  'schedule': task_schedule,
 
142
  )
143
  print(f"[CELERY BEAT] Creating content task - ID: {gen_job_id}")
144
  print(f"[CELERY BEAT] Content task schedule: minute={content_gen_time['minute']}, hour={content_gen_time['hour']}, day_of_week={content_gen_time['day_of_week']}")
145
+ args = (
146
  schedule.get('Social_network', {}).get('id_utilisateur'),
147
  schedule_id,
148
  supabase_config
149
+ )
150
+ print(f"[CELERY BEAT] Content task args: {args}")
151
  new_schedule[gen_job_id] = {
152
  'task': 'backend.celery_tasks.content_tasks.generate_content_task',
153
  'schedule': task_schedule,
 
169
  )
170
  print(f"[CELERY BEAT] Creating publish task - ID: {pub_job_id}")
171
  print(f"[CELERY BEAT] Publish task schedule: minute={publish_time['minute']}, hour={publish_time['hour']}, day_of_week={publish_time['day_of_week']}")
172
+ args = (
173
  schedule_id,
174
  supabase_config
175
+ )
176
+ print(f"[CELERY BEAT] Publish task args: {args}")
177
  new_schedule[pub_job_id] = {
178
  'task': 'backend.celery_tasks.content_tasks.publish_post_task',
179
  'schedule': task_schedule,