mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-13 22:32:15 +00:00
Minor fixes for deployment issues
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
BROKER_HOST = "localhost"
|
BROKER_HOST = "localhost"
|
||||||
BROKER_PORT = 5673
|
BROKER_PORT = 5672
|
||||||
BROKER_USER = "%(user)s"
|
BROKER_USER = "%(user)s"
|
||||||
BROKER_PASSWORD = "%(password)s"
|
BROKER_PASSWORD = "%(password)s"
|
||||||
BROKER_VHOST = "%(vhost)s"
|
BROKER_VHOST = "%(vhost)s"
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ def import_apikey(api_userid, api_key, user=None, force_cache=False):
|
|||||||
return acc
|
return acc
|
||||||
|
|
||||||
|
|
||||||
@task(ignore_result=True, rate_limit='10/d')
|
@task(ignore_result=True, rate_limit='1/h')
|
||||||
def import_alliance_details():
|
def import_alliance_details():
|
||||||
from eve_api.api_puller.alliances import __start_full_import as alliance_import
|
from eve_api.api_puller.alliances import __start_full_import as alliance_import
|
||||||
alliance_import()
|
alliance_import()
|
||||||
|
|||||||
18
fabfile.py
vendored
18
fabfile.py
vendored
@@ -77,17 +77,27 @@ def setup_db():
|
|||||||
run('if [ ! -e dbsettings.py ]; then cp dbsettings.py.example dbsettings.py; fi' % env)
|
run('if [ ! -e dbsettings.py ]; then cp dbsettings.py.example dbsettings.py; fi' % env)
|
||||||
run('env/bin/python manage.py syncdb --noinput --migrate')
|
run('env/bin/python manage.py syncdb --noinput --migrate')
|
||||||
|
|
||||||
def setup_rabbitmq():
|
def generate_brokersettings():
|
||||||
"""
|
"""
|
||||||
Setup the RabbitMQ instance on the system (requires sudo access)
|
Generates the brokersettings file
|
||||||
"""
|
"""
|
||||||
|
|
||||||
require('path')
|
require('hosts')
|
||||||
|
|
||||||
cnf = open('brokersettings.py.example', 'r').read()
|
cnf = open('brokersettings.py.example', 'r').read()
|
||||||
out = open('brokersettings.py', 'w')
|
out = open('brokersettings.py', 'w')
|
||||||
out.write(cnf % env)
|
out.write(cnf % env)
|
||||||
|
|
||||||
|
def setup_rabbitmq():
|
||||||
|
"""
|
||||||
|
Setup the RabbitMQ instance on the system (requires sudo access)
|
||||||
|
"""
|
||||||
|
|
||||||
|
require('hosts')
|
||||||
|
require('path')
|
||||||
|
|
||||||
|
generate_brokersettings()
|
||||||
|
|
||||||
sudo('rabbitmqctl add_user %s %s' % (env.user, env.password), shell=False)
|
sudo('rabbitmqctl add_user %s %s' % (env.user, env.password), shell=False)
|
||||||
sudo('rabbitmqctl add_vhost %s' % env.vhost, shell=False)
|
sudo('rabbitmqctl add_vhost %s' % env.vhost, shell=False)
|
||||||
sudo('rabbitmqctl set_permissions -p %s %s ".*" ".*" ".*"' % (env.vhost, env.user), shell=False)
|
sudo('rabbitmqctl set_permissions -p %s %s ".*" ".*" ".*"' % (env.vhost, env.user), shell=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user