Refactor EventHandles supervisord access to a mixin

This commit is contained in:
Kristóf Tóth
2018-01-24 12:17:15 +01:00
parent 3a7349abd4
commit 2b306efb04
2 changed files with 10 additions and 9 deletions

View File

@ -1,4 +1,6 @@
import json
import json, xmlrpc.client
from config.envvars import SUPERVISOR_HTTP_URI
def parse_anchor_from_message(message):
@ -11,4 +13,7 @@ def create_source_code_response_data(filename, content, language):
'filename': filename,
'content': content,
'language': language
}
}
class SupervisorMixin:
supervisor = xmlrpc.client.ServerProxy(SUPERVISOR_HTTP_URI).supervisor