Skip to content

Instantly share code, notes, and snippets.

View mattbennett's full-sized avatar

Matt Yule-Bennett mattbennett

  • London, England
View GitHub Profile
@mattbennett
mattbennett / gist:4cec602c39b7a738a373
Created August 18, 2014 15:50
rabbitmq management server 500 Error on connection delete
=INFO REPORT==== 18-Aug-2014::15:37:16 ===
Adding vhost 'nameko'
=INFO REPORT==== 18-Aug-2014::15:37:16 ===
Setting permissions for 'guest' in 'nameko' to '.*', '.*', '.*'
=INFO REPORT==== 18-Aug-2014::15:37:16 ===
accepting AMQP connection <0.9149.0> (127.0.0.1:41142 -> 127.0.0.1:5672)
=INFO REPORT==== 18-Aug-2014::15:37:16 ===
@mattbennett
mattbennett / gist:69302fcaf54a4b9be9c6
Created August 18, 2014 16:17
rabbitmq management server 500 Error on vhost delete
=INFO REPORT==== 18-Aug-2014::16:12:24 ===
Adding vhost 'nameko'
=INFO REPORT==== 18-Aug-2014::16:12:24 ===
Setting permissions for 'guest' in 'nameko' to '.*', '.*', '.*'
=INFO REPORT==== 18-Aug-2014::16:12:25 ===
accepting AMQP connection <0.2181.1> (127.0.0.1:43102 -> 127.0.0.1:5672)
=INFO REPORT==== 18-Aug-2014::16:12:25 ===
@mattbennett
mattbennett / gist:4132689345adcb17703c
Last active January 6, 2016 22:54
rabbitmq management server 500 Error on rapid connection delete
=INFO REPORT==== 18-Aug-2014::18:09:20 ===
Deleting vhost 'nameko'
=INFO REPORT==== 18-Aug-2014::18:09:21 ===
Adding vhost 'nameko'
=INFO REPORT==== 18-Aug-2014::18:09:21 ===
Setting permissions for 'guest' in 'nameko' to '.*', '.*', '.*'
=INFO REPORT==== 18-Aug-2014::18:09:21 ===
amqp://shrqdjyp:[email protected]/shrqdjyp
username: shrqdjyp
password: zIP80Nq3s2M2nwpbSej0YQGipMgMqZsw
--
@mattbennett
mattbennett / client.py
Last active July 7, 2022 19:38
Greenthread worker
import eventlet
eventlet.monkey_patch()
from eventlet.greenpool import GreenPile
from kombu.pools import producers
from kombu import Exchange, Queue
exchange = Exchange('exchange', type='direct')
queue = Queue('queue', exchange, routing_key='queue')
@mattbennett
mattbennett / shared_connection.py
Created December 18, 2014 13:38
Shared kombu connection
import eventlet
eventlet.monkey_patch()
from kombu import Exchange, Queue
from kombu.messaging import Consumer
exchange = Exchange('exchange', type='direct')
queue = Queue('queue', exchange, routing_key='queue')
if __name__ == '__main__':
@mattbennett
mattbennett / impl.py
Created June 30, 2015 19:28
coverage.py exec
def foo():
print "foo"
def bar():
print "bar"
@mattbennett
mattbennett / raising.py
Created August 3, 2015 10:40
Raising vs reraising
import sys
def foo():
bar()
def bar():
baz()
@mattbennett
mattbennett / config.py
Created August 11, 2015 14:17
Config DependencyProvider
from nameko.extensions import DependencyProvider
class Config(DependencyProvider):
def get_dependency(self, worker_ctx):
return self.container.config.copy()
@mattbennett
mattbennett / .coveragerc
Last active March 4, 2020 05:59
coverage subprocess
[run]
branch = True
source = .