trabajo-afectivo/lib/tasks/zammad/flush/log/scheduler.rake

17 lines
433 B
Ruby
Raw Permalink Normal View History

# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
2018-10-01 17:41:17 +00:00
namespace :zammad do
namespace :flush do
namespace :log do
desc 'Flushes the log Rails file of the given or active environment'
task :rails, [:env] do |_task, args| # rubocop:disable Rails/RakeEnvironment
2018-10-01 17:41:17 +00:00
env = args.fetch(:env, Rails.env)
File.write(Rails.root.join('log', "#{env}.log"), '')
end
end
end
end