1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/workers/i_calendar_import_worker.rb
2019-12-02 15:53:24 +01:00

15 lines
334 B
Ruby

# frozen_string_literal: true
# Periodically import the iCalendar RFC 5545 events from the configured source
class ICalendarImportWorker
include Sidekiq::Worker
def perform(calendar_ids = ICalendar.all.map(&:id))
service = ICalendarImportService.new
calendar_ids.each do |id|
service.import(id)
end
end
end