mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-05 16:24:21 +01:00
15 lines
334 B
Ruby
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
|