Finalize ZMQ interface

This commit is contained in:
Yax 2018-01-20 11:56:14 +01:00
parent cedac41b10
commit feb280ed8c
2 changed files with 2 additions and 2 deletions

View file

@ -397,7 +397,7 @@ def rss(token, onstart=False):
def mail(to_email, subject, message):
zmsg = {
'topic': 'email:sendmail',
'topic': 'email:send',
'to': to_email,
'subject': subject,
'content': message

View file

@ -15,7 +15,7 @@ context = zmq.Context()
def process(message):
data = json.loads(message)
if data['topic'] == 'email:newmail':
if data['topic'] == 'email:mail':
logger.info('newmail => {}'.format(data))
processor.enqueue({'request': 'new_mail', 'data': data})