Hello

I am experiencing some issues with scheduler.py module

While running on my local machine (Windows 10, postgres database,..) the 
scheduler under the following command start relatively quick

scheduler = Scheduler(db, tasks = dict(runWoshiEngine = 
runWoshiEngine,saveIdOut=saveIdOut ) ,heartbeat = 1)

 
Lets say under 1 second. 

On my server machine (Windows server 2008, postgres db, etc....) there is a 
huge delay when scheduler starts. about 20-30 seconds.

Any suggestions on what the issue migh tbe

Trough schedule I run an external exe application

The code:

How I call schedule 

task = scheduler.queue_task(runWoshiEngine, [scriptId, path, parallel])


in my scheduler.py 

def runWoshiEngine(scriptId, path, parallel):
# import os, sys
# import time
import subprocess
#UKAZ - woshi_engine.exe skripta.lls -4
#print "runWoshiEngine in progress...... with %s parallel instances" % 
(str(parallel))
if parallel == 0:
woshi_input_string = 'woshi_engine.exe ' + str(scriptId)
else:
parallel_str = " -p%s" % (str(parallel))
woshi_input_string = 'woshi_engine.exe ' + str(scriptId) + parallel_str

#print "engine run for script %s with %s parallel instances" % 
(str(scriptId), str(parallel))
print woshi_input_string
#p = subprocess.Popen([woshi_input_string], shell=True, stdout = 
subprocess.PIPE, cwd=path) #- ne dela na serverju - Blage zakaj
#p = subprocess.Popen(['woshi_engine.exe', woshi_input_string], shell=True, 
stdout = subprocess.PIPE, cwd=path)
p = subprocess.Popen(woshi_input_string, shell=True, stdout = 
subprocess.PIPE, cwd=path)
return dict(status = 1)

scheduler = Scheduler(db, tasks = dict(runWoshiEngine = 
runWoshiEngine,saveIdOut=saveIdOut ) ,heartbeat = 1)


any suggestions ?

thank you



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to