mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-28 08:48:13 +08:00
medic is now sentinel and runs in it's own process sentinel shutdown procedure more stable
10 lines
173 B
Python
10 lines
173 B
Python
import time
|
|
|
|
# simple countdown
|
|
def countdown(n):
|
|
start_time = time.time()
|
|
while n > 0:
|
|
n -= 1
|
|
stop_time = time.time()
|
|
return stop_time - start_time
|