Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Hardik Juneja
erp5
Commits
86d6d81c
Commit
86d6d81c
authored
Nov 20, 2017
by
Hardik Juneja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMFActivity: Add a function to create hashes
parent
40fd88e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
product/CMFActivity/Activity/SQLJoblib.py
product/CMFActivity/Activity/SQLJoblib.py
+6
-5
No files found.
product/CMFActivity/Activity/SQLJoblib.py
View file @
86d6d81c
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment