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
c09a6daf
Unverified
Commit
c09a6daf
authored
6 years ago
by
Richard van der Hoff
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #3110 from NotAFile/py3-six-queue
Replace Queue with six.moves.queue
parents
692a3cc8
878995e6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/storage/event_federation.py
+4
-2
4 additions, 2 deletions
synapse/storage/event_federation.py
synapse/util/file_consumer.py
+2
-2
2 additions, 2 deletions
synapse/util/file_consumer.py
with
6 additions
and
4 deletions
synapse/storage/event_federation.py
+
4
−
2
View file @
c09a6daf
...
...
@@ -25,7 +25,9 @@ from synapse.util.caches.descriptors import cached
from
unpaddedbase64
import
encode_base64
import
logging
from
Queue
import
PriorityQueue
,
Empty
from
six.moves.queue
import
PriorityQueue
,
Empty
from
six.moves
import
range
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -79,7 +81,7 @@ class EventFederationWorkerStore(EventsWorkerStore, SignatureWorkerStore,
front_list
=
list
(
front
)
chunks
=
[
front_list
[
x
:
x
+
100
]
for
x
in
x
range
(
0
,
len
(
front
),
100
)
for
x
in
range
(
0
,
len
(
front
),
100
)
]
for
chunk
in
chunks
:
txn
.
execute
(
...
...
This diff is collapsed.
Click to expand it.
synapse/util/file_consumer.py
+
2
−
2
View file @
c09a6daf
...
...
@@ -17,7 +17,7 @@ from twisted.internet import threads, reactor
from
synapse.util.logcontext
import
make_deferred_yieldable
,
preserve_fn
import
Q
ueue
from
six.moves
import
q
ueue
class
BackgroundFileConsumer
(
object
):
...
...
@@ -49,7 +49,7 @@ class BackgroundFileConsumer(object):
# Queue of slices of bytes to be written. When producer calls
# unregister a final None is sent.
self
.
_bytes_queue
=
Q
ueue
.
Queue
()
self
.
_bytes_queue
=
q
ueue
.
Queue
()
# Deferred that is resolved when finished writing
self
.
_finished_deferred
=
None
...
...
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