How to use the queuelib.amqp function in queuelib

To help you get started, we’ve selected a few queuelib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openrightsgroup / Blocking-Middleware / backend / queue-services / View on Github external
'url': url,
            'status': status,
            'probe_uuid': self.cfg.get('cf-probe', 'probe_uuid'),
            'date': self.signer.timestamp(),
            'blocktype': 'PARENTAL',
            'config': -1,
            'ip_network': None,
            'http_status': None,
        rsp['signature'] = self.signer.get_signature(
            keys=["probe_uuid", "url", "status", "date", "config"])

        urlhash = data.get('hash')
        msg = amqp.Message(json.dumps(rsp))
        routing_key = 'results.' + + '.' + \
            (urlhash if urlhash is not None else ''), self.cfg.get('cf-probe','exchange'), routing_key)

        return True