workaround migration bug introduced by 975bcdec3a
This commit is contained in:
parent
817d61491e
commit
6632f5ed75
2 changed files with 8 additions and 8 deletions
|
@ -5,12 +5,12 @@ namespace :foodsoft do
|
|||
task :notify_upcoming_tasks => :environment do
|
||||
tasks = Task.where(done: false, due_date: 1.day.from_now.to_date)
|
||||
for task in tasks
|
||||
say "Send notifications for #{task.name} to .."
|
||||
rake_say "Send notifications for #{task.name} to .."
|
||||
for user in task.users
|
||||
begin
|
||||
Mailer.upcoming_tasks(user, task).deliver if user.settings.notify['upcoming_tasks'] == 1
|
||||
rescue
|
||||
say "deliver aborted for #{user.email}.."
|
||||
rake_say "deliver aborted for #{user.email}.."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -27,7 +27,7 @@ namespace :foodsoft do
|
|||
begin
|
||||
Mailer.not_enough_users_assigned(task, user).deliver
|
||||
rescue
|
||||
say "deliver aborted for #{user.email}"
|
||||
rake_say "deliver aborted for #{user.email}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -49,6 +49,6 @@ namespace :foodsoft do
|
|||
end
|
||||
|
||||
# Helper
|
||||
def say(message)
|
||||
def rake_say(message)
|
||||
puts message unless Rake.application.options.silent
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace :multicoops do
|
|||
task :run => :environment do
|
||||
task_to_run = ENV['TASK']
|
||||
FoodsoftConfig.each_coop do |coop|
|
||||
say "Run '#{task_to_run}' for #{coop}"
|
||||
rake_say "Run '#{task_to_run}' for #{coop}"
|
||||
Rake::Task[task_to_run].execute
|
||||
end
|
||||
end
|
||||
|
@ -17,7 +17,7 @@ namespace :multicoops do
|
|||
task :run_single => :environment do
|
||||
task_to_run = ENV['TASK']
|
||||
FoodsoftConfig.select_foodcoop ENV['FOODCOOP']
|
||||
say "Run '#{task_to_run}' for #{ENV['FOODCOOP']}"
|
||||
rake_say "Run '#{task_to_run}' for #{ENV['FOODCOOP']}"
|
||||
Rake::Task[task_to_run].execute
|
||||
end
|
||||
|
||||
|
@ -25,6 +25,6 @@ end
|
|||
|
||||
|
||||
# Helper
|
||||
def say(message)
|
||||
puts message unless Rake.application.options.silent
|
||||
def rake_say(message)
|
||||
puts message unless Rake.application.options.silent
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue