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:
Zach Pendleton 2013-04-16 11:11:59 -06:00
parent eca5e4f73c
commit 0fe154f15e
2 changed files with 11 additions and 15 deletions

View File

@ -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

View File

@ -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