Better binaries
parent
4a8876214c
commit
88c4151328
10
bin/enqueue
10
bin/enqueue
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
require 'sidekiq'
|
||||
options = {
|
||||
url: ENV['REDIS_URL'],
|
||||
namespace: :cryptcheck
|
||||
}
|
||||
client = Sidekiq::Client.new Sidekiq::RedisConnection.create options
|
||||
clazz, *args = ARGV
|
||||
clazz += 'Worker'
|
||||
client.push({ 'class' => clazz, 'args' => args })
|
|
@ -0,0 +1 @@
|
|||
runner
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env ruby
|
||||
ENV['RAILS_ENV'] ||= 'development'
|
||||
require 'dotenv'
|
||||
Dotenv.load ".env.#{ENV['RAILS_ENV']}", '.env'
|
||||
|
||||
if ENV['RAILS_ENV'] == 'development'
|
||||
DIR = File.dirname File.dirname File.expand_path __FILE__
|
||||
require File.join DIR, 'config/environment'
|
||||
ENV['RAILS_ENV'] = 'test'
|
||||
require 'sidekiq/testing/inline'
|
||||
end
|
||||
|
||||
require 'sidekiq'
|
||||
options = {
|
||||
url: ENV['REDIS_URL'],
|
||||
namespace: :cryptcheck
|
||||
}
|
||||
client = Sidekiq::Client.new Sidekiq::RedisConnection.create options
|
||||
|
||||
clazz, *args = ARGV
|
||||
clazz += 'Worker'
|
||||
client.push({ 'class' => clazz, 'args' => args })
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
DIR="$(readlink -m "$(dirname "$0")")"
|
||||
LD_LIBRARY_PATH="${DIR}/../../cryptcheck/lib" "${0}.rb" $*
|
20
bin/sidekiq
20
bin/sidekiq
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
$:.unshift File.expand_path File.join File.dirname(__FILE__), '../../cryptcheck/lib'
|
||||
require 'rubygems'
|
||||
require 'bundler/setup'
|
||||
|
||||
$TESTING = false
|
||||
$CELLULOID_DEBUG = false
|
||||
|
||||
require 'sidekiq/cli'
|
||||
|
||||
begin
|
||||
cli = Sidekiq::CLI.instance
|
||||
cli.parse
|
||||
cli.run
|
||||
rescue => e
|
||||
raise e if $DEBUG
|
||||
STDERR.puts e.message
|
||||
STDERR.puts e.backtrace.join("\n")
|
||||
exit 1
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
runner
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env ruby
|
||||
$:.unshift File.expand_path File.join File.dirname(__FILE__), '../../cryptcheck/lib'
|
||||
require 'rubygems'
|
||||
require 'bundler/setup'
|
||||
|
||||
$TESTING = false
|
||||
$CELLULOID_DEBUG = false
|
||||
|
||||
require 'sidekiq/cli'
|
||||
|
||||
begin
|
||||
cli = Sidekiq::CLI.instance
|
||||
cli.parse
|
||||
cli.run
|
||||
rescue => e
|
||||
raise e if $DEBUG
|
||||
STDERR.puts e.message
|
||||
STDERR.puts e.backtrace.join("\n")
|
||||
exit 1
|
||||
end
|
Loading…
Reference in New Issue