Class: CreateTicketWorker

Inherits:
ApplicationWorker show all
Includes:
Sidekiq::Worker
Defined in:
app/workers/create_ticket_worker.rb

Constant Summary

Constants inherited from ApplicationWorker

ApplicationWorker::ERRORS

Instance Method Summary collapse

Methods inherited from ApplicationWorker

#success?

Instance Method Details

#perform(user_id, pool_id, time_ref) ⇒ Object

Raises:



7
8
9
10
11
12
13
14
15
16
# File 'app/workers/create_ticket_worker.rb', line 7

def perform(user_id, pool_id, time_ref)
  @user_id = user_id
  @pool_id = pool_id
  @time_ref = time_ref
  raise UserNotFoundError unless user_exists?
  raise PoolNotFoundError unless pool_exists?
  if create_ticket
    @success = true
  end
end