Skip to content

Instantly share code, notes, and snippets.

View antico5's full-sized avatar

Armando Andini antico5

  • Santa Fe, Argentina
View GitHub Profile

gem 'sidekiq-cron'

config/initializers/sidekiq.rb

Sidekiq.configure_server do |config|
  config.redis = { url: 'redis://localhost:6379/0'  }
  schedule_file = "config/schedule.yml"
  if File.exists?(schedule_file)
    Sidekiq::Cron::Job.load_from_hash YAML.load_file(schedule_file)
 end
@antico5
antico5 / gist:f1a329a8379062cbd463769f33c4ba86
Created December 27, 2016 18:04
Sidekiq on production

##YML

sidekiq.yml
---
:verbose: false
:concurrency: 10
:pidfile: tmp/pids/sidekiq.pid
:queues:
  - [critical, 2]
  - default
@antico5
antico5 / transactionlogs
Last active August 29, 2015 14:02
Transaction logs a crear
name:
RFIDTagID
value:
params[:rfid]
action:
REQUEST
cuando:
en ProcessController#rfid_input
name:
@antico5
antico5 / armando.rb
Created June 5, 2014 00:56
Armando bot
class Predictor
attr_accessor :ticks, :enemies, :bot
def initialize bot
@ticks = 0
@enemies = {}
@bot = bot
end
def predict_coordinates &b