Class: Canopus::Language::BackgroundAnalysis::Job

Inherits:
Object
  • Object
show all
Defined in:
lib/canopus/language/background_analysis/job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#future ⇒ Object

Returns the value of attribute future.



4
5
6
# File 'lib/canopus/language/background_analysis/job.rb', line 4

def future
  @future
end

#inner ⇒ Object

Returns the value of attribute inner.



4
5
6
# File 'lib/canopus/language/background_analysis/job.rb', line 4

def inner
  @inner
end

Instance Method Details

#cancel ⇒ Object



5
6
7
8
# File 'lib/canopus/language/background_analysis/job.rb', line 5

def cancel
  @cancelled = true
  @inner&.cancel
end

#check! ⇒ Object

Raises:

  • (Zaniah::Task::Cancelled)


9
10
11
# File 'lib/canopus/language/background_analysis/job.rb', line 9

def check!
  raise Zaniah::Task::Cancelled, "superseded language analysis" if @cancelled
end