Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-03-01 05:12:32 +0300
committerTomasz Maczukin <tomasz@maczukin.pl>2018-03-28 14:57:40 +0300
commit1dde609ca6b130aa0a3d39e929edee7e770e62fc (patch)
tree5cd6b85eaf9c49e7c14aa23c5c2aa5814f1d955b /app/serializers/build_metadata_entity.rb
parentd34e937b93b103435a59e6759a9f30e9f8addc11 (diff)
Move job timeout information to new ci_builds_metadata table
Diffstat (limited to 'app/serializers/build_metadata_entity.rb')
-rw-r--r--app/serializers/build_metadata_entity.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/serializers/build_metadata_entity.rb b/app/serializers/build_metadata_entity.rb
new file mode 100644
index 00000000000..71c7295ba9f
--- /dev/null
+++ b/app/serializers/build_metadata_entity.rb
@@ -0,0 +1,10 @@
+class BuildMetadataEntity < Grape::Entity
+
+ expose :used_timeout_human_readable do |metadata|
+ metadata.used_timeout_human_readable unless metadata.used_timeout.nil?
+ end
+
+ expose :timeout_source do |metadata|
+ metadata.present.timeout_source
+ end
+end