Class: CoalescingPanda::CanvasBatchesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/coalescing_panda/canvas_batches_controller.rb

Instance Method Summary collapse

Instance Method Details

#clear_batch_sessionObject



20
21
22
23
# File 'app/controllers/coalescing_panda/canvas_batches_controller.rb', line 20

def clear_batch_session
  current_session_data[:canvas_batch_id] = nil
  render nothing: true
end

#retriggerObject



10
11
12
13
14
15
16
17
18
# File 'app/controllers/coalescing_panda/canvas_batches_controller.rb', line 10

def retrigger
  @batch = CanvasBatch.find(params[:id])
  @batch.status = 'Queued'
  @batch.save
  worker = CoalescingPanda::Workers::CourseMiner.new(@batch.context, @batch.options)
  current_session_data[:canvas_batch_id] = worker.batch.id
  worker.start(true)
  redirect_to :back
end

#showObject



5
6
7
8
# File 'app/controllers/coalescing_panda/canvas_batches_controller.rb', line 5

def show
  @batch = CanvasBatch.find(params[:id])
  render @batch
end