Class: GraphQL::Execution::Pool::Worker

Inherits:
Object
  • Object
show all
Includes:
Celluloid
Defined in:
lib/graphql/execution/worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(block) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/graphql/execution/worker.rb', line 16

def perform(block)
  value = block.call
  value = value.value if value.is_a?(Celluloid::Future)
  value
rescue Exception => e
  e
end