Commit 57e7b1ed authored by Aaron R Poulter-martinez's avatar Aaron R Poulter-martinez
Browse files

changed code from creating new thread to creating new process

parent b83c2302
......@@ -6,6 +6,7 @@ from flask import render_template
# app imports
from appmethods import update_both_dbs, run_schedule_loop
from redisactions import redisdb
from multiprocessing import Process
# python imports
import json
......@@ -45,13 +46,18 @@ def get_last_update():
return resp
# make sure the cacheing is set up on init
# make sure the cacheing is set up on init
thread.start_new_thread(run_schedule_loop, ())
print "started thread!"
pUpdate = Process(target = update_both_dbs, args = ())
pSchedule = Process(target = run_schedule_loop, args = ())
print("Process Started!")
except Exception as e:
print "===================================================" \
+ "Unable to start scheduling thread" \
+ traceback.print_exc(file=sys.stdout) \
+ "==================================================="
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment