Commit 86d6d81c authored by Hardik Juneja's avatar Hardik Juneja

CMFActivity: Add a function to create hashes

parent 40fd88e7
......@@ -43,6 +43,11 @@ _DequeueMessageException = Exception()
from SQLDict import SQLDict
def sqljoblib_hash(args):
signature = joblib_hash(args)
sigint = int(signature, 16) % (10 ** 16)
return sigint
class SQLJoblib(SQLDict):
"""
A simple OOBT based queue, It is non transatactional and follow always-excute paradigm.
......@@ -79,11 +84,7 @@ class SQLJoblib(SQLDict):
"""
assert not message.is_registered, message
message.is_registered = True
signature = joblib_hash(message.args)
sigint = int(signature, 16) % (10 ** 16)
message.activity_kw['signature'] = sigint
message.activity_kw['signature'] = sqljoblib_hash(message.args)
if activity_buffer.activity_tool is None:
self.activity_tool = activity_tool
self.prepareMessage(activity_tool, message)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment