How to execute two tasks at same time
问题 I'm working with celery that I encountered a problem. I have two functions: 1) This function will be activated when the program is activated, and it will work infinitely: from celery.signals import worker_ready @worker_ready.connect() def message_poll_start(sender=None, headers=None, body=None, **kwargs): while True: time.sleep(2) print("hello") 2) This function will be activated every ten seconds and write a date in a txt file: @periodic_task(run_every=timedelta(seconds=10)) def last_record