Esempio n. 1
0
    def run(self, provider_type=None):
        for subscriber in superdesk.get_resource_service('subscribers').get(
                req=None, lookup={}):
            if subscriber['is_active']:
                for destination in subscriber.get('destinations', []):
                    kwargs = {
                        'subscriber': subscriber,
                        'destination': destination
                    }

                    publish.apply_async(expires=10, kwargs=kwargs)
Esempio n. 2
0
    def run(self, provider_type=None):
        for subscriber in superdesk.get_resource_service('subscribers').get(req=None, lookup={}):
            if subscriber['is_active']:
                for destination in subscriber.get('destinations', []):
                    kwargs = {
                        'subscriber': subscriber,
                        'destination': destination
                    }

                    publish.apply_async(
                        expires=10,
                        kwargs=kwargs)
Esempio n. 3
0
    def run(self, provider_type=None):
        output_channels = superdesk.get_resource_service('output_channels').get(req=None, lookup={'is_active': True})
        output_channels = {str(output_channel['_id']): output_channel for output_channel in output_channels}

        for subscriber in superdesk.get_resource_service('subscribers').get(req=None, lookup={}):
            if subscriber['is_active']:
                for destination in subscriber.get('destinations', []):
                    kwargs = {
                        'subscriber': subscriber,
                        'destination': destination,
                        'output_channels': output_channels
                    }

                    publish.apply_async(
                        expires=10,
                        kwargs=kwargs)
 def run(self, provider_type=None):
     publish.apply_async(expires=10)
Esempio n. 5
0
 def run(self, provider_type=None):
     publish.apply_async(expires=10)