Class: TranscodingMachine::Client::JobQueue
- Inherits:
-
Object
- Object
- TranscodingMachine::Client::JobQueue
- Defined in:
- lib/transcoding_machine/client/job_queue.rb
Instance Method Summary collapse
-
#initialize ⇒ JobQueue
constructor
A new instance of JobQueue.
- #push(queue_name, bucket, key, media_player_ids, result_queue_name) ⇒ Object
Constructor Details
#initialize ⇒ JobQueue
Returns a new instance of JobQueue.
7 8 9 |
# File 'lib/transcoding_machine/client/job_queue.rb', line 7 def initialize @sqs = RightAws::SqsGen2.new end |
Instance Method Details
#push(queue_name, bucket, key, media_player_ids, result_queue_name) ⇒ Object
11 12 13 14 |
# File 'lib/transcoding_machine/client/job_queue.rb', line 11 def push(queue_name, bucket, key, media_player_ids, result_queue_name) msg = {:bucket => bucket, :key => key, :media_players => media_player_ids, :result_queue => result_queue_name} @sqs.queue(queue_name).push(msg.to_yaml) end |