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
c1b7e4a1
Commit
c1b7e4a1
authored
Jun 08, 2020
by
Alexandru Croitor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused StuckImportJobsWorker
parent
a2f63f4e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
54 deletions
+0
-54
app/workers/all_queues.yml
app/workers/all_queues.yml
+0
-8
app/workers/stuck_import_jobs_worker.rb
app/workers/stuck_import_jobs_worker.rb
+0
-19
spec/workers/stuck_import_jobs_worker_spec.rb
spec/workers/stuck_import_jobs_worker_spec.rb
+0
-27
No files found.
app/workers/all_queues.yml
View file @
c1b7e4a1
...
...
@@ -339,14 +339,6 @@
:weight:
1
:idempotent:
:tags: []
-
:name: cronjob:stuck_import_jobs
:feature_category: :importers
:has_external_dependencies:
:urgency: :low
:resource_boundary: :cpu
:weight:
1
:idempotent:
:tags: []
-
:name: cronjob:stuck_merge_jobs
:feature_category: :source_code_management
:has_external_dependencies:
...
...
app/workers/stuck_import_jobs_worker.rb
deleted
100644 → 0
View file @
a2f63f4e
# frozen_string_literal: true
class
StuckImportJobsWorker
# rubocop:disable Scalability/IdempotentWorker
include
Gitlab
::
Import
::
StuckImportJob
private
def
track_metrics
(
with_jid_count
,
without_jid_count
)
Gitlab
::
Metrics
.
add_event
(
:stuck_import_jobs
,
projects_without_jid_count:
without_jid_count
,
projects_with_jid_count:
with_jid_count
)
end
def
enqueued_import_states
ProjectImportState
.
with_status
([
:scheduled
,
:started
])
end
end
spec/workers/stuck_import_jobs_worker_spec.rb
deleted
100644 → 0
View file @
a2f63f4e
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
StuckImportJobsWorker
do
let
(
:worker
)
{
described_class
.
new
}
describe
'with scheduled import_status'
do
it_behaves_like
'stuck import job detection'
do
let
(
:import_state
)
{
create
(
:project
,
:import_scheduled
).
import_state
}
before
do
import_state
.
update
(
jid:
'123'
)
end
end
end
describe
'with started import_status'
do
it_behaves_like
'stuck import job detection'
do
let
(
:import_state
)
{
create
(
:project
,
:import_started
).
import_state
}
before
do
import_state
.
update
(
jid:
'123'
)
end
end
end
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