cirandas.net

ref: master

script/task-notifier


#!/usr/bin/env ruby

require_relative '../config/environment'

include GetText
ActionController::Base.init_gettext 'noosfero'

# when in production set RAILS_ENV to 'production'

Person.with_pending_tasks.each do |p|
  set_locale_all p.last_lang
  PendingTaskNotifier.deliver_notification(p)
  Rails.logger.info('deliver notification for ' + p.identifier)
end