[virtualcommons-svn] /hgrepo/v/vi/virtualcommons/virtualcommons: pushing vcweb settin...
Status: Beta
Brought to you by:
alllee
From: <vir...@li...> - 2011-05-17 23:09:56
|
Subject: hg.virtualcommons 367 details: http://virtualcommons.hg.sourceforge.net:8000/hgroot/virtualcommons/virtualcommons/hgrepo/v/vi/virtualcommons/virtualcommons/rev/b75f90304368 changeset: 367:b75f90304368 user: Allen Lee <all...@as...> date: Tue May 17 16:09:49 2011 -0700 description: pushing vcweb settings into functions to allow setup() to work properly diffstat: vcweb/fabfile.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diffs (39 lines): diff -r e7b4abf46a96 -r b75f90304368 vcweb/fabfile.py --- a/vcweb/fabfile.py Tue May 17 01:05:45 2011 -0700 +++ b/vcweb/fabfile.py Tue May 17 16:09:49 2011 -0700 @@ -26,7 +26,6 @@ # django integration for access to settings, etc. django.project(env.project_name) -from vcweb import settings as vcweb_settings """ this currently only works for sqlite3 development database. do it by hand with @@ -56,6 +55,7 @@ sudo_chain(["rabbitmqctl %s" % cmd for cmd in ['stop_app', 'reset', 'start_app']]) def setup_rabbitmq(): + from vcweb import settings as vcweb_settings clear_rabbitmq_db() with fab_settings(warn_only=True): sudo("rabbitmqctl delete_user %s" % vcweb_settings.BROKER_USER, pty=True) @@ -87,7 +87,10 @@ with cd(env.project_path): _virtualenv('%(python)s manage.py test %(apps)s' % env) -def tornadio(ip="149.169.203.115", port=vcweb_settings.SOCKET_IO_PORT): +def tornadio(ip="149.169.203.115", port=None): + from vcweb import settings as vcweb_settings + if port is None: + port = vcweb_settings.SOCKET_IO_PORT local("{python} vcwebio.py {port}".format(python=env.python, **locals()), capture=False) def server(ip="149.169.203.115", port=8000): @@ -139,6 +142,7 @@ sudo(' && '.join(commands), **kwargs) def deploy(): + from vcweb import settings as vcweb_settings """ deploys to an already setup environment """ env.project_path = env.deploy_path + env.project_name push() |