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
Boxiang Sun
gitlab-ce
Commits
efaa3669
Commit
efaa3669
authored
Oct 01, 2018
by
Shinya Maeda
Committed by
Alessio Caiazza
Oct 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the order of status_sql to avoid the query for scheduled status at the earlier step
parent
70d015d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
app/models/concerns/has_status.rb
app/models/concerns/has_status.rb
+1
-1
No files found.
app/models/concerns/has_status.rb
View file @
efaa3669
...
@@ -33,7 +33,6 @@ module HasStatus
...
@@ -33,7 +33,6 @@ module HasStatus
warnings
=
scope_warnings
.
select
(
'count(*) > 0'
).
to_sql
.
presence
||
'false'
warnings
=
scope_warnings
.
select
(
'count(*) > 0'
).
to_sql
.
presence
||
'false'
"(CASE
"(CASE
WHEN (
#{
scheduled
}
)>0 THEN 'scheduled'
WHEN (
#{
builds
}
)=(
#{
skipped
}
) AND (
#{
warnings
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
skipped
}
) AND (
#{
warnings
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
skipped
}
) THEN 'skipped'
WHEN (
#{
builds
}
)=(
#{
skipped
}
) THEN 'skipped'
WHEN (
#{
builds
}
)=(
#{
success
}
) THEN 'success'
WHEN (
#{
builds
}
)=(
#{
success
}
) THEN 'success'
...
@@ -43,6 +42,7 @@ module HasStatus
...
@@ -43,6 +42,7 @@ module HasStatus
WHEN (
#{
builds
}
)=(
#{
created
}
)+(
#{
skipped
}
)+(
#{
pending
}
) THEN 'pending'
WHEN (
#{
builds
}
)=(
#{
created
}
)+(
#{
skipped
}
)+(
#{
pending
}
) THEN 'pending'
WHEN (
#{
running
}
)+(
#{
pending
}
)>0 THEN 'running'
WHEN (
#{
running
}
)+(
#{
pending
}
)>0 THEN 'running'
WHEN (
#{
manual
}
)>0 THEN 'manual'
WHEN (
#{
manual
}
)>0 THEN 'manual'
WHEN (
#{
scheduled
}
)>0 THEN 'scheduled'
WHEN (
#{
created
}
)>0 THEN 'running'
WHEN (
#{
created
}
)>0 THEN 'running'
ELSE 'failed'
ELSE 'failed'
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