修复定时任务缺少参数的问题

main
rogersun 5 days ago
parent 7419eaf47f
commit d53c5e60ec
  1. 2
      ai/tasks.py
  2. 2
      ai/utils/show_func.py

@ -13,6 +13,6 @@ def ai_show_general():
@shared_task(time_limit=18*60, soft_time_limit=18*60) @shared_task(time_limit=18*60, soft_time_limit=18*60)
def get_new_movie_task(): def get_new_movie_task():
get_new_movie(None) get_new_movie()
print("task success") print("task success")
return True return True

@ -160,7 +160,7 @@ def get_new_suggestion(cinema, show_date):
return None return None
def get_new_movie(start_date): def get_new_movie(start_date=None):
cinema_list = TestCinema.objects.all() cinema_list = TestCinema.objects.all()
start_date_obj = datetime.datetime.today() start_date_obj = datetime.datetime.today()
if start_date is not None: if start_date is not None:

Loading…
Cancel
Save