Skip to content
Browse files

Merge branch 'development' of github.com:zero-labs/radia-source into …

…development
  • Loading branch information...
2 parents 75b9f7c + c4ecd9c commit 646c758467b495f4552d48fce34c52721559e67e @dzacarias dzacarias committed Apr 21, 2011
View
4 scheduler/app/controllers/program_schedule_controller.rb
@@ -34,8 +34,8 @@ def update
dtend = ProgramSchedule.get_datetime(params["new_schedule"]["end"])
j = Jobs::ScheduleDownloadAndMergeJob.new(:dtend => dtend)
- j.perform #sync
- #Delayed::Job.enqueue(j) # TODO change to async
+ #j.perform #sync
+ Delayed::Job.enqueue(j) # TODO change to async
flash[:notice] = "The schedule is being updated"
redirect_to :action => 'show'
View
1 scheduler/app/models/operation_log.rb
@@ -1,3 +1,2 @@
class OperationLog < ActiveRecord::Base
- symbolize :status
end
View
2 scheduler/app/models/schedule_update_log.rb
@@ -1,3 +1,3 @@
class ScheduleUpdateLog < OperationLog
- validates_inclusion_of :status, :in => [:initializing, :downloading, :parsing, :processing, :persisting, :completed, :failed]
+ symbolize :status, :in => [:initialized, :downloading, :parsing, :processing, :persisting, :completed, :failed]
end
View
1 scheduler/lib/jobs/schedule_download_and_merge_job.rb
@@ -48,7 +48,6 @@ def perform
log.operation_errors = e.to_operation_log_msg
puts e
puts e.backtrace
- return false
ensure
log.dtend = Time.now;
log.save!
View
2 scheduler/lib/radia_source/lightweight/program_schedule.rb
@@ -123,7 +123,7 @@ def self.load_calendars(templates, filenames = {})
end
if not errors.empty?
- raise CalendarFetchFailedException errors
+ raise CalendarFetchFailedException.new(errors)
end
return { :originals => originals, :repetitions => repetitions }
View
7 scheduler/test/unit/operation_log_test.rb
@@ -17,6 +17,11 @@ def test_status_can_be_saved_as_string
:dtstart => Time.now,
:dtend => 1.hour.from_now,
:operation_errors => 'Messages')
- assert op.save
+ assert op.save
+ end
+
+ def test_status_create!
+ assert = OperationLog.create!(:status => 'initializing',
+ :dtstart => Time.now)
end
end

0 comments on commit 646c758

Please sign in to comment.
Something went wrong with that request. Please try again.