Commit 7f0a1c97 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'track-sidekiq-status-for-import-repository-worker' into 'master'

Track job status for ImportRepositoryWorker

See merge request gitlab-org/gitlab!76544
parents 656cc7b8 3a617793
......@@ -35,7 +35,9 @@ module Gitlab
def execute
Gitlab::Import::SetAsyncJid.set_jid(project.import_state)
# We need to track this job's status for use by Gitlab::GithubImport::RefreshImportJidWorker.
Stage::ImportRepositoryWorker
.with_status
.perform_async(project.id)
true
......
......@@ -27,8 +27,13 @@ RSpec.describe Gitlab::GithubImport::ParallelImporter do
before do
create(:import_state, :started, project: project)
worker = double(:worker)
expect(Gitlab::GithubImport::Stage::ImportRepositoryWorker)
.to receive(:with_status)
.and_return(worker)
expect(worker)
.to receive(:perform_async)
.with(project.id)
.and_return('123')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment