blob: 53985f6dc321dbceecf1c62bce649c36fedcfbf9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/env ruby
require "bundler/setup"
$LOAD_PATH.unshift(File.expand_path("../lib", File.dirname(__FILE__)))
require "killjoy"
require "killjoy/server"
shards = ENV.fetch("RMQ_SHARDS", 4).to_i
server = ServerEngine::Daemon.new(Killjoy::Server, Killjoy::Worker, {}) do
{
amqp_uri: ENV.fetch("RABBITMQ_URL", "amqp://guest:guest@localhost:5672"),
daemonize: false,
exchange: 'killjoy',
exchange_type: 'x-modulus-hash',
pid_path: 'tmp/killjoy.pid',
queue_shards: shards,
worker_type: 'process',
workers: shards,
}
end
server.run
|