Skip to content

Commit 31aa239

Browse files
committed
webhook async task start impreve
1 parent a72a6a5 commit 31aa239

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/jobs/async_task_starter_job.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ def perform(project_id)
77
::SourcesFetchJob.new.perform(project_id)
88
project = ::Project.find(project_id)
99
if project.sources_verified?
10-
::Task::Starter.new(project, skip_fetch: true).call
10+
task = ::Task::Starter.new(project, skip_fetch: true).call
11+
if task.invalid?
12+
raise Error, task.errors.full_messages.to_sentence
13+
end
1114
else
1215
raise Error, project.sources_fetch_error.to_s
1316
end

0 commit comments

Comments
 (0)