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
Package registry
Container Registry
Model registry
Operate
Terraform modules
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
Timo Ley
synapse
Commits
b9b72bc6
Commit
b9b72bc6
authored
7 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Comments
parent
29574fd5
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/federation/transaction_queue.py
+14
-1
14 additions, 1 deletion
synapse/federation/transaction_queue.py
with
14 additions
and
1 deletion
synapse/federation/transaction_queue.py
+
14
−
1
View file @
b9b72bc6
...
@@ -78,8 +78,18 @@ class TransactionQueue(object):
...
@@ -78,8 +78,18 @@ class TransactionQueue(object):
self
.
pending_edus_by_dest
=
edus
=
{}
self
.
pending_edus_by_dest
=
edus
=
{}
# Presence needs to be separate as we send single aggragate EDUs
# Presence needs to be separate as we send single aggragate EDUs
# Map of user_id -> UserPresenceState for all the pending presence
# to be sent out by user_id. Entries here get processed and put in
# pending_presence_by_dest
self
.
pending_presence
=
{}
self
.
pending_presence
=
{}
# Map of destination -> user_id -> UserPresenceState of pending presence
# to be sent to each destinations
self
.
pending_presence_by_dest
=
presence
=
{}
self
.
pending_presence_by_dest
=
presence
=
{}
# Pending EDUs by their "key". Keyed EDUs are EDUs that get clobbered
# based on their key (e.g. typing events by room_id)
# Map of destination -> (edu_type, key) -> Edu
self
.
pending_edus_keyed_by_dest
=
edus_keyed
=
{}
self
.
pending_edus_keyed_by_dest
=
edus_keyed
=
{}
metrics
.
register_callback
(
metrics
.
register_callback
(
...
@@ -227,11 +237,14 @@ class TransactionQueue(object):
...
@@ -227,11 +237,14 @@ class TransactionQueue(object):
self
.
_attempt_new_transaction
,
destination
self
.
_attempt_new_transaction
,
destination
)
)
@preserve_fn
@preserve_fn
# the caller should not yield on this
@defer.inlineCallbacks
@defer.inlineCallbacks
def
send_presence
(
self
,
states
):
def
send_presence
(
self
,
states
):
"""
Send the new presence states to the appropriate destinations.
"""
Send the new presence states to the appropriate destinations.
This actually queues up the presence states ready for sending and
triggers a background task to process them and send out the transactions.
Args:
Args:
states (list(UserPresenceState))
states (list(UserPresenceState))
"""
"""
...
...
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