Class: ExpireTicketJob
- Inherits:
-
Struct
- Object
- Struct
- ExpireTicketJob
- Defined in:
- app/models/job/expire_ticket_job.rb
Instance Attribute Summary collapse
-
#cart_id ⇒ Object
Returns the value of attribute cart_id.
-
#ticket_ids ⇒ Object
Returns the value of attribute ticket_ids.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#cart_id ⇒ Object
Returns the value of attribute cart_id
1 2 3 |
# File 'app/models/job/expire_ticket_job.rb', line 1 def cart_id @cart_id end |
#ticket_ids ⇒ Object
Returns the value of attribute ticket_ids
1 2 3 |
# File 'app/models/job/expire_ticket_job.rb', line 1 def ticket_ids @ticket_ids end |
Class Method Details
.enqueue(ticket_ids, cart_id) ⇒ Object
2 3 4 |
# File 'app/models/job/expire_ticket_job.rb', line 2 def self.enqueue(ticket_ids, cart_id) Delayed::Job.enqueue(ExpireTicketJob.new(ticket_ids, cart_id), :run_at => 10.minutes.from_now, :queue => "ticket") end |
Instance Method Details
#perform ⇒ Object
6 7 8 |
# File 'app/models/job/expire_ticket_job.rb', line 6 def perform Ticket.unlock(ticket_ids, cart_id) end |