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
840e6fdb
Commit
840e6fdb
authored
Jul 05, 2019
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add queue_size method to ApplicationWorker
parent
27c4b8aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
app/workers/concerns/application_worker.rb
app/workers/concerns/application_worker.rb
+6
-0
No files found.
app/workers/concerns/application_worker.rb
View file @
840e6fdb
# frozen_string_literal: true
require
'sidekiq/api'
Sidekiq
::
Worker
.
extend
ActiveSupport
::
Concern
module
ApplicationWorker
...
...
@@ -44,6 +46,10 @@ module ApplicationWorker
get_sidekiq_options
[
'queue'
].
to_s
end
def
queue_size
Sidekiq
::
Queue
.
new
(
queue
).
size
end
def
bulk_perform_async
(
args_list
)
Sidekiq
::
Client
.
push_bulk
(
'class'
=>
self
,
'args'
=>
args_list
)
end
...
...
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