summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-01-15 17:47:28 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-01-15 17:47:56 -0500
commite8785ded1e922a72989614d7e70e9c26c367f1aa (patch)
tree28e931ab7f05aaf09fcce2ca983d98ba8175c2ab /lib
parent8a028cf3a25a80b696635c62297f775664da8c2a (diff)
downloadgitlab-ce-e8785ded1e922a72989614d7e70e9c26c367f1aa.tar.gz
Prevent StateMachine warnings from outputting during a cron task
[ci skip] Closes #5931
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/gitlab/task_helpers.rake3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tasks/gitlab/task_helpers.rake b/lib/tasks/gitlab/task_helpers.rake
index 8c63877e51c..d33b5b31e18 100644
--- a/lib/tasks/gitlab/task_helpers.rake
+++ b/lib/tasks/gitlab/task_helpers.rake
@@ -4,6 +4,9 @@ end
String.disable_colorization = true unless STDOUT.isatty
+# Prevent StateMachine warnings from outputting during a cron task
+StateMachines::Machine.ignore_method_conflicts = true if ENV['CRON']
+
namespace :gitlab do
# Ask if the user wants to continue