diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-10-27 17:05:02 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-11-15 13:54:47 +0100 |
commit | 4dab79c5c6aa1eed1295663fe91c62ea0062f8d2 (patch) | |
tree | 2af95bb0669bed87a5a95f1fca9a38a2ff2f48cd /app/models/ci/build.rb | |
parent | b3616e3074202d63a4ed03bbe94b14a4488c7800 (diff) | |
download | gitlab-ce-4dab79c5c6aa1eed1295663fe91c62ea0062f8d2.tar.gz |
Update the updated_at of a build while patching the trace
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r-- | app/models/ci/build.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index bf5f92f8462..33612256540 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -271,6 +271,7 @@ module Ci def append_trace(trace_part, offset) recreate_trace_dir + touch if needs_touch? trace_part = hide_secrets(trace_part) @@ -280,6 +281,10 @@ module Ci end end + def needs_touch? + Time.now - updated_at > 15.minutes.to_i + end + def trace_file_path if has_old_trace_file? old_path_to_trace |