summaryrefslogtreecommitdiff
path: root/app/models/commit_status.rb
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-06-04 12:44:00 +0200
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-06-04 12:44:00 +0200
commit1709e5cf876cf92c939464a633ddc6858b506e4f (patch)
tree80c9edfa02f72154543eaff87dee90219219a90d /app/models/commit_status.rb
parenta29ba51eeac6c7281b2fe81e655be946842045c0 (diff)
downloadgitlab-ce-1709e5cf876cf92c939464a633ddc6858b506e4f.tar.gz
retryable? is now available for CommitStatuszj-job-view-goes-real-time
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index fe63728ea23..d08c79cb055 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -18,7 +18,7 @@ class CommitStatus < ActiveRecord::Base
validates :name, presence: true
alias_attribute :author, :user
-
+
scope :failed_but_allowed, -> do
where(allow_failure: true, status: [:failed, :canceled])
end
@@ -126,6 +126,11 @@ class CommitStatus < ActiveRecord::Base
false
end
+ # To be overriden when inherrited from
+ def retryable?
+ false
+ end
+
def stuck?
false
end