Koed00 / django-q

A multiprocessing distributed task queue for Django
https://django-q.readthedocs.org
MIT License
1.83k stars 285 forks source link

Set to run once a minute, the execution time is abnormal. #736

Open Anning01 opened 9 months ago

Anning01 commented 9 months ago

image

def main(): start_time = time.time() while time.time() - start_time < 59:
time.sleep(1)
print(f"{time.time() - start_time}second...")

print("Complete the 59 second loop.")

Q_CLUSTER = { 'name': 'DJRedis', 'workers': 3, 'timeout': 600, 'retry': 600, "ack_failures": True, 'django_redis': 'default' }

I don't understand, isn't this supposed to run continuously, why do you sometimes wait for a minute before executing?