Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
Syncrepl monitoring tools
Commits
386fe12f
Commit
386fe12f
authored
Sep 08, 2021
by
Ondřej Kuzník
Browse files
Fix cookie updates
parent
0f891992
Changes
2
Hide whitespace changes
Inline
Side-by-side
syncmonitor/cookie.py
View file @
386fe12f
...
...
@@ -70,6 +70,11 @@ class SyncreplCookie:
def
update
(
self
,
cookie
):
"Merge the two cookies, incorporating all CSNs into this one"
updated
=
False
if
cookie
is
None
:
updated
=
bool
(
self
)
self
.
_csnset
=
{}
return
updated
if
isinstance
(
cookie
,
__class__
):
for
sid
,
csn
in
cookie
.
_csnset
.
items
():
if
sid
not
in
self
.
_csnset
or
self
.
_csnset
[
sid
]
<
csn
:
...
...
syncmonitor/environment.py
View file @
386fe12f
...
...
@@ -263,5 +263,5 @@ class SyncreplEnvironment:
else
:
# a cookie reset happened, recreate environment cookie
self
.
cookie
=
SyncreplCookie
()
for
uri
,
provider
in
self
.
providers
.
items
():
cookie
.
update
(
provider
.
cookie
)
self
.
cookie
.
update
(
provider
.
cookie
)
self
.
cookie_updated
(
self
.
cookie
)
Write
Preview
Supports
Markdown
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