Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions adsputils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,15 @@ def forward_message(self, *args, **kwargs):
self.forward_message(message, pipeline=OUTPUT_PIPELINE)
"""
pipeline = kwargs.get('pipeline', 'default')


if not kwargs.get('priority', None): priority = None

if self.forward_message_dict and pipeline:
if not self.forward_message_dict[pipeline].get('broker'):
raise NotImplementedError('Sorry, your app is not properly configured (no broker).')
forwarding_connection = BrokerConnection(self.forward_message_dict[pipeline].get('broker'))
self.logger.debug('Forwarding results out to: %s', self.forward_message_dict[pipeline].get('broker'))
return self.forward_message_dict[pipeline]['forward message'].apply_async(args, kwargs, connection=forwarding_connection)
return self.forward_message_dict[pipeline]['forward message'].apply_async(args, kwargs, connection=forwarding_connection, priority=priority)
else:
raise NotImplementedError('Sorry, your app is not properly configured.')

Expand Down
Loading