Class: SpreeCmCommissioner::CustomerNotificationCronExecutor
- Inherits:
-
BaseInteractor
- Object
- BaseInteractor
- SpreeCmCommissioner::CustomerNotificationCronExecutor
- Defined in:
- app/interactors/spree_cm_commissioner/customer_notification_cron_executor.rb
Instance Method Summary collapse
- #call ⇒ Object
- #customer_notifications ⇒ Object
- #enqueue_customer_notification_alert(customer_notification) ⇒ Object
Instance Method Details
#call ⇒ Object
3 4 5 6 7 |
# File 'app/interactors/spree_cm_commissioner/customer_notification_cron_executor.rb', line 3 def call customer_notifications.find_each do |customer_notification| enqueue_customer_notification_alert(customer_notification) end end |
#customer_notifications ⇒ Object
9 10 11 |
# File 'app/interactors/spree_cm_commissioner/customer_notification_cron_executor.rb', line 9 def customer_notifications SpreeCmCommissioner::CustomerNotification.scheduled_items end |
#enqueue_customer_notification_alert(customer_notification) ⇒ Object
13 14 15 |
# File 'app/interactors/spree_cm_commissioner/customer_notification_cron_executor.rb', line 13 def enqueue_customer_notification_alert(customer_notification) SpreeCmCommissioner::CustomerNotificationSenderJob.perform_later(customer_notification.id) end |