Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
241e4e86
Commit
241e4e86
authored
7 years ago
by
Neil Johnson
Browse files
Options
Downloads
Patches
Plain Diff
remove twisted deferral cruft
parent
4262aba1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/storage/__init__.py
+3
-6
3 additions, 6 deletions
synapse/storage/__init__.py
with
3 additions
and
6 deletions
synapse/storage/__init__.py
+
3
−
6
View file @
241e4e86
...
...
@@ -244,7 +244,6 @@ class DataStore(RoomMemberStore, RoomStore,
return
[
UserPresenceState
(
**
row
)
for
row
in
rows
]
@defer.inlineCallbacks
def
count_daily_users
(
self
):
"""
Counts the number of users who used this homeserver in the last 24 hours.
...
...
@@ -264,10 +263,9 @@ class DataStore(RoomMemberStore, RoomStore,
count
,
=
txn
.
fetchone
()
return
count
ret
=
yield
self
.
runInteraction
(
"
count_users
"
,
_count_users
)
defer
.
returnValue
(
ret
)
ret
urn
self
.
runInteraction
(
"
count_users
"
,
_count_users
)
@defer.inlineCallbacks
def
count_r30_users
(
self
):
"""
Counts the number of 30 day retained users, defined as:-
...
...
@@ -320,8 +318,7 @@ class DataStore(RoomMemberStore, RoomStore,
results
[
"
ALL
"
],
=
txn
.
fetchone
()
return
results
ret
=
yield
self
.
runInteraction
(
"
count_r30_users
"
,
_count_r30_users
)
defer
.
returnValue
(
ret
)
return
self
.
runInteraction
(
"
count_r30_users
"
,
_count_r30_users
)
def
get_users
(
self
):
"""
Function to reterive a list of users in users table.
...
...
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