remove import and external_feed_id from calendar_events.
removed unused code to import an ical feed into a calendar, and dropped the external_feed_id from the calendar_events table because it isn't being used. Change-Id: I9c093f4f2f63cc503d74bfc1cde089bf24ea0d73 Reviewed-on: https://gerrit.instructure.com/19615 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Eric Berry <ericb@instructure.com> QA-Review: Zach Pendleton <zachp@instructure.com> Product-Review: Marc LeGendre <marc@instructure.com> QA-Review: Marc LeGendre <marc@instructure.com>
This commit is contained in:
parent
eca5e4f73c
commit
0fe154f15e
|
@ -0,0 +1,11 @@
|
|||
class DropCalendarEventsExternalFeedId < ActiveRecord::Migration
|
||||
tag :postdeploy
|
||||
|
||||
def self.up
|
||||
remove_column :calendar_events, :external_feed_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :calendar_events, :external_feed_id, :integer
|
||||
end
|
||||
end
|
|
@ -62,21 +62,6 @@ class ExternalFeedAggregator
|
|||
rescue
|
||||
end
|
||||
end
|
||||
elsif feed.feed_type == 'ical'
|
||||
require 'icalendar'
|
||||
begin
|
||||
cals = Icalendar.parse(body)
|
||||
tally = []
|
||||
entries = []
|
||||
cals.each do |cal|
|
||||
tally += feed.events
|
||||
entries += feed.add_ical_entries(cal)
|
||||
end
|
||||
@logger.info("#{tally.length} ical events found")
|
||||
@logger.info("#{entries.length} new entries added")
|
||||
return true
|
||||
rescue
|
||||
end
|
||||
end
|
||||
false
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue