Class: Kidspire::PcoInboundEventsSyncJob
- Inherits:
-
ApplicationJob
- Object
- ActiveJob::Base
- ApplicationJob
- Kidspire::PcoInboundEventsSyncJob
- Defined in:
- app/jobs/kidspire/pco_inbound_events_sync_job.rb
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/jobs/kidspire/pco_inbound_events_sync_job.rb', line 3 def perform return unless SyncSetting.current.inbound_events_sync? client = PcoClient.new sync_calendar_events(client) sync_checkins_events(client) SyncSetting.current.update!(last_synced_at: Time.current) Rails.logger.info("[Kidspire] PcoInboundEventsSyncJob complete") rescue PcoError => e Rails.logger.error("[Kidspire] PcoInboundEventsSyncJob failed: #{e.}") raise end |