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
e984a8a3
Commit
e984a8a3
authored
Aug 25, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate new jobs when reverting pipeline queues migration
parent
a653c8ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb
...migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb
+3
-0
spec/migrations/migrate_pipeline_sidekiq_queues_spec.rb
spec/migrations/migrate_pipeline_sidekiq_queues_spec.rb
+7
-2
No files found.
db/post_migrate/20170822101017_migrate_pipeline_sidekiq_queues.rb
View file @
e984a8a3
...
...
@@ -10,5 +10,8 @@ class MigratePipelineSidekiqQueues < ActiveRecord::Migration
def
down
sidekiq_queue_migrate
'pipeline_default'
,
to:
'pipeline'
sidekiq_queue_migrate
'pipeline_processing'
,
to:
'pipeline'
sidekiq_queue_migrate
'pipeline_hooks'
,
to:
'pipeline'
sidekiq_queue_migrate
'pipeline_cache'
,
to:
'pipeline'
end
end
spec/migrations/migrate_pipeline_sidekiq_queues_spec.rb
View file @
e984a8a3
...
...
@@ -21,12 +21,17 @@ describe MigratePipelineSidekiqQueues, :sidekiq, :redis do
it
'correctly migrates queue when migrating down'
do
Sidekiq
::
Testing
.
disable!
do
stubbed_worker
(
queue: :pipeline_default
).
perform_async
(
'Class'
,
[
1
])
stubbed_worker
(
queue: :pipeline_default
).
perform_async
(
'Class'
,
[
2
])
stubbed_worker
(
queue: :pipeline_processing
).
perform_async
(
'Class'
,
[
2
])
stubbed_worker
(
queue: :pipeline_hooks
).
perform_async
(
'Class'
,
[
3
])
stubbed_worker
(
queue: :pipeline_cache
).
perform_async
(
'Class'
,
[
4
])
described_class
.
new
.
down
expect
(
sidekiq_queue_length
(
'pipeline'
)).
to
eq
2
expect
(
sidekiq_queue_length
(
'pipeline'
)).
to
eq
4
expect
(
sidekiq_queue_length
(
'pipeline_default'
)).
to
eq
0
expect
(
sidekiq_queue_length
(
'pipeline_processing'
)).
to
eq
0
expect
(
sidekiq_queue_length
(
'pipeline_hooks'
)).
to
eq
0
expect
(
sidekiq_queue_length
(
'pipeline_cache'
)).
to
eq
0
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