commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/baeb5e138337/ Changeset: baeb5e138337 User: dannon Date: 2015-02-06 15:55:15+00:00 Summary: Minor formatting of routes in buildapp.py Affected #: 1 file diff -r be4958cce4aac391972fd635a424954789b0c36b -r baeb5e1383373966bda98ab78b7d22c73c2fd53f lib/galaxy/webapps/galaxy/buildapp.py --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -248,12 +248,28 @@ webapp.add_route( '/visualization/show/:visualization_name', controller='visualization', action='render', visualization_name=None ) # Deprecated in favor of POST /api/workflows with 'workflow' in payload. - webapp.mapper.connect( 'import_workflow_deprecated', '/api/workflows/upload', controller='workflows', action='import_new_workflow_deprecated', conditions=dict( method=['POST'] ) ) - webapp.mapper.connect( 'workflow_dict', '/api/workflows/{workflow_id}/download', controller='workflows', action='workflow_dict', conditions=dict( method=['GET'] ) ) + webapp.mapper.connect( 'import_workflow_deprecated', + '/api/workflows/upload', + controller='workflows', + action='import_new_workflow_deprecated', + conditions=dict( method=['POST'] ) ) + webapp.mapper.connect( 'workflow_dict', + '/api/workflows/{workflow_id}/download', + controller='workflows', + action='workflow_dict', + conditions=dict( method=['GET'] ) ) # Preserve the following download route for now for dependent applications -- deprecate at some point - webapp.mapper.connect( 'workflow_dict', '/api/workflows/download/{workflow_id}', controller='workflows', action='workflow_dict', conditions=dict( method=['GET'] ) ) + webapp.mapper.connect( 'workflow_dict', + '/api/workflows/download/{workflow_id}', + controller='workflows', + action='workflow_dict', + conditions=dict( method=['GET'] ) ) # Deprecated in favor of POST /api/workflows with shared_workflow_id in payload. - webapp.mapper.connect( 'import_shared_workflow_deprecated', '/api/workflows/import', controller='workflows', action='import_shared_workflow_deprecated', conditions=dict( method=['POST'] ) ) + webapp.mapper.connect( 'import_shared_workflow_deprecated', + '/api/workflows/import', + controller='workflows', + action='import_shared_workflow_deprecated', + conditions=dict( method=['POST'] ) ) # API refers to usages and invocations - these mean the same thing but the # usage routes should be considered deprecated. https://bitbucket.org/galaxy/galaxy-central/commits/3afdce4f6a74/ Changeset: 3afdce4f6a74 User: dannon Date: 2015-02-06 16:05:06+00:00 Summary: Force postfork unique servername on uwsgi workers in the format of 'servername.workername'. Use this for correctly routing messages. Affected #: 2 files diff -r baeb5e1383373966bda98ab78b7d22c73c2fd53f -r 3afdce4f6a74f88aa36ed7d9c4f4180906c88f77 lib/galaxy/queues.py --- a/lib/galaxy/queues.py +++ b/lib/galaxy/queues.py @@ -27,8 +27,12 @@ Refactor later to actually persist this somewhere instead of building it repeatedly. """ - return [Queue('control.%s' % q, galaxy_exchange, routing_key='control') for - q in config.server_names] + possible_uwsgi_queues = [] + if config.is_uwsgi: + import uwsgi + possible_uwsgi_queues = [Queue("control.%s.%s" % (config.server_name, wkr['id']), galaxy_exchange, routing_key='control') for wkr in uwsgi.workers()] + return possible_uwsgi_queues + [Queue('c ntrol.%s' % q, galaxy_exchange, routing_key='control') for + q in config.server_names] def control_queue_from_config(config): @@ -36,5 +40,10 @@ Returns a Queue instance with the correct name and routing key for this galaxy process's config """ - return Queue("control.%s" % config.server_name, galaxy_exchange, - routing_key='control') + if config.is_uwsgi: + import uwsgi + return Queue("control.%s.%s" % (config.server_name, uwsgi.worker_id()), galaxy_exchange, + routing_key='control') + else: + return Queue("control.%s" % config.server_name, galaxy_exchange, + routing_key='control') diff -r baeb5e1383373966bda98ab78b7d22c73c2fd53f -r 3afdce4f6a74f88aa36ed7d9c4f4180906c88f77 lib/galaxy/webapps/galaxy/buildapp.py --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -124,6 +124,9 @@ def postfork_setup(): from galaxy.app import app from galaxy.queue_worker import GalaxyQueueWorker + if app.config.is_uwsgi: + import uwsgi + app.config.server_name += ".%s" % uwsgi.worker_id() app.control_worker = GalaxyQueueWorker(app, galaxy.queues.control_queue_from_config(app.config), galaxy.queue_worker.control_message_to_task) app.control_worker.daemon = True Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org