diff options
author | Rémy Coutable <remy@rymai.me> | 2019-01-21 22:20:38 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-02-05 16:04:54 +0300 |
commit | 6b39f55d3f0ba0d48e920693c4d5128e26769a1c (patch) | |
tree | a55eae5d31118fa44d902a932ea638163356d3ed /lib/gitlab/task_helpers.rb | |
parent | 31fc5965baf9ca23a1da4a0ffc350102fe4c89c6 (diff) |
Add cache to the 'compile-assets' and 'gitlab:assets:compile' jobs
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/task_helpers.rb')
-rw-r--r-- | lib/gitlab/task_helpers.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/task_helpers.rb b/lib/gitlab/task_helpers.rb index 224bb648d8f..8532845f3cb 100644 --- a/lib/gitlab/task_helpers.rb +++ b/lib/gitlab/task_helpers.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'rainbow/ext/string' -require 'gitlab/utils/strong_memoize' +require_dependency 'gitlab/utils/strong_memoize' # rubocop:disable Rails/Output module Gitlab @@ -13,6 +13,12 @@ module Gitlab extend self + def invoke_and_time_task(task) + start = Time.now + Rake::Task[task].invoke + puts "`#{task}` finished in #{Time.now - start} seconds" + end + # Ask if the user wants to continue # # Returns "yes" the user chose to continue |