[REF] netsvc: explicit Agent thread creation.
bzr revid: vmt@openerp.com-20110421155836-70da1nhpb38zqbls
This commit is contained in:
parent
7008aa3e0e
commit
a659d1fa8c
|
@ -150,6 +150,8 @@ if config["translate_in"]:
|
|||
if config["stop_after_init"]:
|
||||
sys.exit(0)
|
||||
|
||||
openerp.netsvc.start_agent()
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Launch Servers
|
||||
#----------------------------------------------------------
|
||||
|
|
|
@ -277,12 +277,13 @@ class Agent(object):
|
|||
time.sleep(1)
|
||||
time.sleep(60)
|
||||
|
||||
agent_runner = threading.Thread(target=Agent.runner, name="netsvc.Agent.runner")
|
||||
# the agent runner is a typical daemon thread, that will never quit and must be
|
||||
# terminated when the main process exits - with no consequence (the processing
|
||||
# threads it spawns are not marked daemon)
|
||||
agent_runner.setDaemon(True)
|
||||
agent_runner.start()
|
||||
def start_agent():
|
||||
agent_runner = threading.Thread(target=Agent.runner, name="netsvc.Agent.runner")
|
||||
# the agent runner is a typical daemon thread, that will never quit and must be
|
||||
# terminated when the main process exits - with no consequence (the processing
|
||||
# threads it spawns are not marked daemon)
|
||||
agent_runner.setDaemon(True)
|
||||
agent_runner.start()
|
||||
|
||||
import traceback
|
||||
|
||||
|
|
Loading…
Reference in New Issue