This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bunny' | |
require 'active_support/all' | |
class Rabbitmq | |
def self.publish(message, to, delay) | |
channel = connection.create_channel | |
queue = channel.queue(to, durable: true) | |
channel.exchange_declare(DELAYED_EXCHANGE_NAME, 'x-delayed-message', durable: true, arguments: {'x-delayed-type' => 'direct'}) | |
queue.bind(DELAYED_EXCHANGE_NAME, routing_key: queue.name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby -v | |
jruby 9.1.7.0 (2.3.1) 2017-01-11 68056ae Java HotSpot(TM) 64-Bit Server VM 24.80-b11 on 1.7.0_80-b15 +jit [linux-x86_64] | |
$ gem install bunny | |
Successfully installed bunny-2.6.3 | |
1 gem installed | |
$ irb | |
irb(main):001:0> require 'bunny' | |
NameError: uninitialized constant IO::EWOULDBLOCKWaitReadable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test() | |
{ | |
if (true) | |
document.window.Location = "google.com"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test() | |
{ | |
if (true) | |
document.window.Location = "google.com"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test() | |
{ | |
if (true) | |
document.window.Location = "google.com"; | |
} |