We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 436fffe commit 0b8b427Copy full SHA for 0b8b427
src/index.py
@@ -9,10 +9,13 @@
9
from biothings.web.launcher import main
10
from tornado.ioloop import IOLoop
11
from tornado.web import RequestHandler
12
+from tornado.options import define, options
13
14
from admin import routine
15
from utils.indices import setup
16
17
+define("prod", default=False, help="Run in production mode", type=bool)
18
+
19
20
def run_routine():
21
thread = Thread(target=routine, daemon=True)
@@ -30,7 +33,7 @@ def get(self):
30
33
31
34
logger = logging.getLogger("routine")
32
35
- if not options.debug:
36
+ if not options.debug and options.prod:
37
crontab("0 0 * * *", func=run_routine, start=True)
38
logger.info("Crontab configured successfully.")
39
0 commit comments