Can't run rumAlchemy in custom port?

4 views
Skip to first unread message

Jorge Vargas

unread,
Sep 25, 2008, 5:30:24 AM9/25/08
to toscawidge...@googlegroups.com
after expending a couple of minutes trying to figure this out I gave
up, is there really no option? So I decided to hack it in myself,
although I was stop by paste.deploy, I just can't seem to get that
package. Here is my patch although it doesn't works.

Am I passing the wrong variable name? Also I'm not sure how to convert
opts into a plain dict, it work with cherrpy but paste gave an error,
but neither of them was able to change the port to the correct number.

--- command.py 2008-09-25 03:26:52.000000000 -0600
+++ command.py.orig 2008-09-25 03:10:52.000000000 -0600
@@ -36,9 +36,7 @@
stream=sys.stderr
)
app = load_app(url, opts)
- global_conf={}
- global_conf[opts.port]=opts.port
- server = loadserver(server_map[opts.server],global_conf=global_conf)
+ server = loadserver(server_map[opts.server])
try:
server(app)
except (KeyboardInterrupt, SystemExit):
@@ -87,10 +85,6 @@
help='WSGI server (default: cherrypy, '\
'available=[%s])' % '|'.join(server_map.keys()),
default='cherrypy')
-parser.add_option('-p', '--port',
- dest='port',
- help='The port to run (default:8080)',
- default='8080')
parser.add_option('-t', '--table',
dest='tables',
action='append',

Michael Brickenstein

unread,
Sep 29, 2008, 5:39:26 AM9/29/08
to ToscaWidgets-discuss
Hi!
I am not a expert in paste.deploy.
But you can run rumalchemy using an
ini-file
A sample is given by development.ini
in the Rumalchemy folder
paster serve your.ini
There you can enter your port
e.g.:


[server:main]
use = egg:Paste#http
host = 127.0.0.1
port = 5000

Michael

Jorge Vargas

unread,
Sep 29, 2008, 9:48:44 AM9/29/08
to toscawidge...@googlegroups.com
I kind of ended up doing something like this. although I went the
"paster serve" way, using two config files as described in
http://toscawidgets.org/documentation/rum/user/deploy.html

I figured out that it was all the same but failed to find out how to
pass that ini file as code, much in the way rumalchemy gets passed the
defaults when no ini file is present in
http://toscawidgets.org/hg/RumAlchemy/file/39f3da0b96a5/rumalchemy/command.py

Your solution seems a bit better than the one in the docs as it
implies having only one config file. But in the long run I'll like to
be able to pass the port as a flag as my half-patch is suggesting,
I'll see a bit more on how RumApp is creating that config, but much as
yourself I'm no expert in paste.

> Michael
>
> >
>

Reply all
Reply to author
Forward
0 new messages