Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b26f6ebe
Commit
b26f6ebe
authored
Sep 10, 2021
by
Kevin Chasse
Committed by
Suzanne Selhorn
Sep 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add info on how to force historical user recount to docs
parent
422d1187
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
...dministration/troubleshooting/gitlab_rails_cheat_sheet.md
+11
-0
No files found.
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
View file @
b26f6ebe
...
...
@@ -596,6 +596,17 @@ curl --silent --header "Private-Token: ********************" \
"https://gitlab.example.com/api/v4/users?per_page=100&active"
| jq
--compact-output
'.[] | [.id,.name,.username]'
```
### Update Daily Billable & Historical users
```
ruby
# Forces recount of historical (max) users
::
HistoricalDataWorker
.
new
.
perform
# Forces recount of daily billable users
identifier
=
Analytics
::
UsageTrends
::
Measurement
.
identifiers
[
:billable_users
]
::
Analytics
::
UsageTrends
::
CounterJobWorker
.
new
.
perform
(
identifier
,
User
.
minimum
(
:id
),
User
.
maximum
(
:id
),
Time
.
zone
.
now
)
```
### Block or Delete Users that have no projects or groups
```
ruby
...
...
Write
Preview
Markdown
is supported
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