Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
655891d1
Commit
655891d1
authored
8 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Move FEDERATION_PING_INTERVAL timer. Update log line
parent
22578545
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/typing.py
+10
-8
10 additions, 8 deletions
synapse/handlers/typing.py
with
10 additions
and
8 deletions
synapse/handlers/typing.py
+
10
−
8
View file @
655891d1
...
@@ -53,7 +53,7 @@ class TypingHandler(object):
...
@@ -53,7 +53,7 @@ class TypingHandler(object):
self
.
hs
=
hs
self
.
hs
=
hs
self
.
clock
=
hs
.
get_clock
()
self
.
clock
=
hs
.
get_clock
()
self
.
wheel_timer
=
WheelTimer
()
self
.
wheel_timer
=
WheelTimer
(
bucket_size
=
5000
)
self
.
federation
=
hs
.
get_replication_layer
()
self
.
federation
=
hs
.
get_replication_layer
()
...
@@ -76,7 +76,7 @@ class TypingHandler(object):
...
@@ -76,7 +76,7 @@ class TypingHandler(object):
)
)
def
_handle_timeouts
(
self
):
def
_handle_timeouts
(
self
):
logger
.
info
(
"
Handling
typing timeout
"
)
logger
.
info
(
"
Checking for
typing timeout
s
"
)
now
=
self
.
clock
.
time_msec
()
now
=
self
.
clock
.
time_msec
()
...
@@ -136,12 +136,6 @@ class TypingHandler(object):
...
@@ -136,12 +136,6 @@ class TypingHandler(object):
then
=
now
+
timeout
,
then
=
now
+
timeout
,
)
)
self
.
wheel_timer
.
insert
(
now
=
now
,
obj
=
member
,
then
=
now
+
FEDERATION_PING_INTERVAL
,
)
if
was_present
:
if
was_present
:
# No point sending another notification
# No point sending another notification
defer
.
returnValue
(
None
)
defer
.
returnValue
(
None
)
...
@@ -208,6 +202,14 @@ class TypingHandler(object):
...
@@ -208,6 +202,14 @@ class TypingHandler(object):
def
_push_remote
(
self
,
member
,
typing
):
def
_push_remote
(
self
,
member
,
typing
):
users
=
yield
self
.
state
.
get_current_user_in_room
(
member
.
room_id
)
users
=
yield
self
.
state
.
get_current_user_in_room
(
member
.
room_id
)
self
.
_member_last_federation_poke
[
member
]
=
self
.
clock
.
time_msec
()
self
.
_member_last_federation_poke
[
member
]
=
self
.
clock
.
time_msec
()
now
=
self
.
clock
.
time_msec
()
self
.
wheel_timer
.
insert
(
now
=
now
,
obj
=
member
,
then
=
now
+
FEDERATION_PING_INTERVAL
,
)
for
domain
in
set
(
get_domain_from_id
(
u
)
for
u
in
users
):
for
domain
in
set
(
get_domain_from_id
(
u
)
for
u
in
users
):
if
domain
!=
self
.
server_name
:
if
domain
!=
self
.
server_name
:
self
.
federation
.
send_edu
(
self
.
federation
.
send_edu
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment