mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 16:42:20 +03:00
agreement request message was added
This commit is contained in:
parent
dc7e070c00
commit
8eeab0ec0a
1 changed files with 14 additions and 0 deletions
|
@ -7,6 +7,7 @@ import sys
|
||||||
|
|
||||||
sys.path.append('../..')
|
sys.path.append('../..')
|
||||||
from base.Scope import Scope
|
from base.Scope import Scope
|
||||||
|
from base.util.util import Util
|
||||||
|
|
||||||
|
|
||||||
# TODO Message Factory
|
# TODO Message Factory
|
||||||
|
@ -135,3 +136,16 @@ class Messaging(object):
|
||||||
json_data = json.dumps(data)
|
json_data = json.dumps(data)
|
||||||
self.logger.debug('[Messaging] Unregister message was created')
|
self.logger.debug('[Messaging] Unregister message was created')
|
||||||
return json_data
|
return json_data
|
||||||
|
|
||||||
|
def agreement_request_msg(self):
|
||||||
|
data = {}
|
||||||
|
data['type'] = 'REQUEST_AGREEMENT'
|
||||||
|
contract_content = self.db_service.select_one_result('contract', 'content', 'id =(select MAX(id) from contract)')
|
||||||
|
if contract_content is not None and contract_content != '':
|
||||||
|
data['md5'] = Util.get_md5_text(contract_content)
|
||||||
|
else:
|
||||||
|
data['md5'] = ''
|
||||||
|
data['timestamp'] = str(datetime.datetime.now().strftime("%d-%m-%Y %I:%M"))
|
||||||
|
json_data = json.dumps(data)
|
||||||
|
self.logger.debug('[Messaging] Agreement request message was created')
|
||||||
|
return json_data
|
||||||
|
|
Loading…
Reference in a new issue