Hi, Thanks for the code! Would you mind adding some documentation and a good summary of what this code provides? I know I would appreciate it very much. Thanks! Harlin Seritt --- On Sat, 8/23/08, ccnusjy <ccn...@gmail.com> wrote: |
Thanks ccnusjy! Pierre, is this something you're going to include in the Karrigell 3.0? Thanks, Harlin Seritt |
--- On Sat, 8/23/08, ccnusjy <ccn...@gmail.com> wrote: |
ccnusjy: I installed processing module and started it up... What's going on here? Karrigell 2.4.0 running on port 8086 Press Ctrl+C to stop Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Python25\Lib\site-packages\processing\forking.py", line 365, in main prepare(*preparation_data) File "C:\Python25\Lib\site-packages\processing\forking.py", line 329, in prepa re File "<string>", line 1, in <module> File "C:\Python25\Lib\site-packages\processing\forking.py", line 365, in main prepare(*preparation_data) File "<string>", line 1, in <module> File "C:\Python25\Lib\site-packages\processing\forking.py", line 365, in main prepare(*preparation_data) '__parents_main__', file, pathname, etc File "C:\Documents and Settings\Harlin\Desktop\Karrigell-2.4.0-dont-delete\Kar rigell-2.4.0\Karrigell_MP.py", line 6, in <module> import KarrigellRequestHandler File "C:\Python25\Lib\site-packages\processing\forking.py", line 329, in prepa re '__parents_main__', file, pathname, etc File "C:\Documents and Settings\Harlin\Desktop\Karrigell-2.4.0-dont-delete\Kar rigell-2.4.0\Karrigell_MP.py", line 6, in <module> import KarrigellRequestHandler File "C:\Python25\Lib\site-packages\processing\forking.py", line 329, in prepa re '__parents_main__', file, pathname, etc File "C:\Documents and Settings\Harlin\Desktop\Karrigell-2.4.0-dont-delete\Kar rigell-2.4.0\Karrigell_MP.py", line 6, in <module> import KarrigellRequestHandler File "C:\Documents and Settings\Harlin\Desktop\Karrigell-2.4.0-dont-delete\Kar rigell-2.4.0\KarrigellRequestHandler.py", line 22, in <module> import k_config File "C:\Documents and Settings\Harlin\Desktop\Karrigell-2.4.0-dont-delete\Kar rigell-2.4.0\KarrigellRequestHandler.py", line 22, in <module> import k_config File "C:\Documents and Settings\Harlin\Desktop\Karrigell-2.4.0-dont-delete\Kar rigell-2.4.0\KarrigellRequestHandler.py", line 22, in <module> import k_config File "C:\Documents and Settings\Harlin\Desktop\Karrigell-2.4.0-dont-delete\Kar rigell-2.4.0\core\k_config.py", line 44, in <module> _opts, _args = getopt.getopt(sys.argv[1:], "hP:L:SR") File "C:\Python25\lib\getopt.py", line 89, in getopt opts, args = do_longs(opts, args[0][2:], longopts, args[1:]) File "C:\Python25\lib\getopt.py", line 153, in do_longs has_arg, opt = long_has_args(opt, longopts) File "C:\Python25\lib\getopt.py", line 170, in long_has_args raise GetoptError('option --%s not recognized' % opt, opt) getopt.GetoptError: option --processing-fork not recognized File "C:\Documents and Settings\Harlin\Desktop\Karrigell-2.4.0-dont-delete\Kar rigell-2.4.0\core\k_config.py", line 44, in <module> _opts, _args = getopt.getopt(sys.argv[1:], "hP:L:SR") File "C:\Python25\lib\getopt.py", line 89, in getopt opts, args = do_longs(opts, args[0][2:], longopts, args[1:]) File "C:\Python25\lib\getopt.py", line 153, in do_longs has_arg, opt = long_has_args(opt, longopts) File "C:\Python25\lib\getopt.py", line 170, in long_has_args File "C:\Documents and Settings\Harlin\Desktop\Karrigell-2.4.0-dont-delete \Karrigell-2.4.0\core\k_config.py", line 44, in <module> _opts, _args = getopt.getopt(sys.argv[1:], "hP:L:SR") File "C:\Python25\lib\getopt.py", line 89, in getopt opts, args = do_longs(opts, args[0][2:], longopts, args[1:]) raise GetoptError('option --%s not recognized' % opt, opt) getopt.GetoptError: option --processing-fork not recognized File "C:\Python25\lib\getopt.py", line 153, in do_longs has_arg, opt = long_has_args(opt, longopts) File "C:\Python25\lib\getopt.py", line 170, in long_has_args raise GetoptError('option --%s not recognized' % opt, opt) getopt.GetoptError: option --processing-fork not recognized Thanks, Harlin Seritt |
--- On Sat, 8/23/08, ccnusjy <ccn...@gmail.com> wrote: |
http://wiki.woodpecker.org.cn/moin/KarrigellWithPyProcessingVeryGoodStrong
--
http://zoomquiet.org'''
过程改进乃是催生可促生靠谱的人的组织!
PE keeps evolving organizations which promoting people be good!'''
so as people said, u need append more doc. for this...
> in line 44:
>
> try:
> _opts, _args = getopt.getopt(sys.argv[1:], "hP:L:SR",['processing-
> fork'])
>
> #~~~~~~~~~~~~~ here
> print _opts,_args
> except getopt.GetoptError:
> # print usage information and exit:
> usage()
> raise
>
> I am not familiar with pyprocessing, I found that the child process
> forked lost the arguments of their parent process, and they had their
> own arguments in sys.argv ('processing-fork' and a process id).
>
>
> However, it's an ugly way to solve the problem. If some one has better
> idea, tell me please.
--
I've put this in place on a windows box and it works but for some reason it doesn't work on a Linux server. When I start it up it starts with no errors and appears to run. Yet I can't connect to it via the web browser. Any ideas? |
Thanks, Harlin Seritt --- On Sat, 8/23/08, ccnusjy <ccn...@gmail.com> wrote: |
From: ccnusjy <ccn...@gmail.com> |
I get this... [root@vlin-ila-wik01 Karrigell-2.4.0-with_mp]# ps all | grep -i karri 0 0 21348 21240 18 0 11596 6004 - S+ pts/1 0:00 python Karrigell_multiprocess.py 1 0 21351 21348 18 0 11596 4132 - S+ pts/1 0:00 python Karrigell_multiprocess.py 1 0 21352 21348 18 0 11596 4132 - S+ pts/1 0:00 python Karrigell_multiprocess.py 1 0 21353 21348 18 0 11596 4132 - S+ pts/1 0:00 python Karrigell_multiprocess.py And still not able to connect to it via browser ... I test that out also with urllib2: >>> import urllib2 >>> url = 'http://9.9.149.167:8082' >>> data = urllib2.urlopen(url).read() |
Traceback (most recent call last): |
File "<stdin>", line 1, in <module> File "c:\Python25\lib\urllib2.py", line 121, in urlopen return _opener.open(url, data) File "c:\Python25\lib\urllib2.py", line 374, in open response = self._open(req, data) File "c:\Python25\lib\urllib2.py", line 392, in _open '_open', req) File "c:\Python25\lib\urllib2.py", line 353, in _call_chain result = func(*args) File "c:\Python25\lib\urllib2.py", line 1100, in http_open return self.do_open(httplib.HTTPConnection, req) File "c:\Python25\lib\urllib2.py", line 1075, in do_open raise URLError(err) urllib2.URLError: <urlopen error (10061, 'Connection refused')> and then netstat -an: [root@vlin-ila-wik01 Karrigell-2.4.0-with_mp]# netstat -an | grep 8082 tcp 0 0 127.0.0.1:8082 0.0.0.0:* LISTEN So I know it's listening but it's not accepting or something... any ideas? Is it possible you can send me a copy of your multiprocess file and k_config.py you're using? Thanks, Harlin Seritt |
--- On Sun, 9/21/08, ccnusjy <ccn...@gmail.com> wrote: |
Also, which version of Python are you using? I am wondering if that may be an issue with the processing module. Thanks, Harlin Seritt |
--- On Sun, 9/21/08, ccnusjy <ccn...@gmail.com> wrote: |
From: ccnusjy <ccn...@gmail.com> |
Date: Sunday, September 21, 2008, 10:44 AM |
Junyi! Thanks for the help! I will try to implement this today. This is for a few apps I run at work that does involve an rsync call and thereby incurs occasionally long-running threads... thus the need for multi-processing. Thanks for pointing this out. I will let you know if I run into any snags. Best Regards, Harlin --- On Sun, 9/21/08, junyi sun <ccn...@gmail.com> wrote: |
#! /usr/bin/python |
def main_start(process_num): |
|
main_start(process_num=3)# reads the Configuration File |
|
"hP:L:SR",['processing-fork=']) |
|
# server directory |
I did some testing with this and found some bleed-over from one session to another. Since many different users will be using this and possibly at one time, I have to think that this is not going to work. Is there anything else that can be done to keep sessions from running into each other? thanks, |
Harlin --- On Sun, 9/21/08, junyi sun <ccn...@gmail.com> wrote: |
#! /usr/bin/python |
def main_start(process_num): |
|
main_start(process_num=3) |