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() ...@@ -43,6 +43,11 @@ _DequeueMessageException = Exception()
from SQLDict import SQLDict from SQLDict import SQLDict
def sqljoblib_hash(args):
signature = joblib_hash(args)
sigint = int(signature, 16) % (10 ** 16)
return sigint
class SQLJoblib(SQLDict): class SQLJoblib(SQLDict):
""" """
A simple OOBT based queue, It is non transatactional and follow always-excute paradigm. A simple OOBT based queue, It is non transatactional and follow always-excute paradigm.
...@@ -79,11 +84,7 @@ class SQLJoblib(SQLDict): ...@@ -79,11 +84,7 @@ class SQLJoblib(SQLDict):
""" """
assert not message.is_registered, message assert not message.is_registered, message
message.is_registered = True message.is_registered = True
message.activity_kw['signature'] = sqljoblib_hash(message.args)
signature = joblib_hash(message.args)
sigint = int(signature, 16) % (10 ** 16)
message.activity_kw['signature'] = sigint
if activity_buffer.activity_tool is None: if activity_buffer.activity_tool is None:
self.activity_tool = activity_tool self.activity_tool = activity_tool
self.prepareMessage(activity_tool, message) 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