get - web2py function not triggered on user request -


using web2py (version 2.8.2-stable+timestamp.2013.11.28.13.54.07), on 64-bit windows, have following problem

there exe program started on user request (first txt file created p triggered).

 p = subprocess.popen(['woshi_engine.exe', scriptid], shell=true, stdout = subprocess.pipe, cwd=path_1) 

while exe file running creating txt file.

the program stopped on user request deleting file program needs input.

when exe started have other requests user can trigger. common request comes server (i used microsoft network monitor check that), function not triggered. tried using scheduler no success. same problem

i stuck here problem

thank help

with of web2py google group solution is.

i used scheduler. created scheduler.py file following code

def runwoshiengine(scriptid, path):      import os, sys     import time     import subprocess     p = subprocess.popen(['woshi_engine.exe', scriptid], shell=true, stdout = subprocess.pipe, cwd=path) return dict(status = 1)    gluon.scheduler import scheduler  scheduler = scheduler(db) 

in controller function

task = scheduler.queue_task(runwoshiengine, [scriptid, path]) 

you have import scheduler (from gluon.scheduler import scheduler)

then run scheduler command prompt following (so if understood correctly have 2 instances of web2py running, 1 webserver, 1 scheduler)

web2py.py -k woshiweb -d 0 (-d 0 verbose logging can removed) 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -