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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
c162e027
Commit
c162e027
authored
Apr 11, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check and report import job status to help diagnose issues with forking
parent
93cfc0b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
app/models/project.rb
app/models/project.rb
+8
-2
No files found.
app/models/project.rb
View file @
c162e027
...
@@ -388,9 +388,15 @@ class Project < ActiveRecord::Base
...
@@ -388,9 +388,15 @@ class Project < ActiveRecord::Base
def
add_import_job
def
add_import_job
if
forked?
if
forked?
RepositoryForkWorker
.
perform_async
(
self
.
id
,
forked_from_project
.
path_with_namespace
,
self
.
namespace
.
path
)
job_id
=
RepositoryForkWorker
.
perform_async
(
self
.
id
,
forked_from_project
.
path_with_namespace
,
self
.
namespace
.
path
)
else
else
RepositoryImportWorker
.
perform_async
(
self
.
id
)
job_id
=
RepositoryImportWorker
.
perform_async
(
self
.
id
)
end
if
job_id
Rails
.
logger
.
info
"Import job started for
#{
path_with_namespace
}
with job ID
#{
job_id
}
"
else
Rails
.
logger
.
error
"Import job failed to start for
#{
path_with_namespace
}
"
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