Class: Hg::Queues::Messenger::PostbackQueue

Inherits:
Queue
  • Object
show all
Defined in:
lib/hg/queues/messenger/postback_queue.rb

Constant Summary collapse

POSTBACKS_QUEUE_KEY_PORTION =
'messenger:postbacks'

Instance Method Summary collapse

Methods inherited from Queue

#pop, #push

Constructor Details

#initialize(user_id: nil, namespace: nil) ⇒ PostbackQueue

Returns a new instance of PostbackQueue.



10
11
12
13
14
15
16
17
18
# File 'lib/hg/queues/messenger/postback_queue.rb', line 10

def initialize(user_id: nil, namespace: nil)
  key = message_key(
    user_id: user_id,
    namespace: namespace,
    key_portion: POSTBACKS_QUEUE_KEY_PORTION
  )

  super(key)
end