2016-04-06 16:42:15 +02:00
|
|
|
from httppusher import HttpPusher
|
2016-04-19 15:24:36 +02:00
|
|
|
from emailpusher import EmailPusher
|
2016-04-06 16:42:15 +02:00
|
|
|
|
|
|
|
PUSHER_TYPES = {
|
2016-04-19 15:24:36 +02:00
|
|
|
'http': HttpPusher,
|
|
|
|
'email': EmailPusher,
|
2016-04-06 16:42:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
def create_pusher(hs, pusherdict):
|
|
|
|
if pusherdict['kind'] in PUSHER_TYPES:
|
|
|
|
return PUSHER_TYPES[pusherdict['kind']](hs, pusherdict)
|