sudo apt-get install runit
cd /etc/sv/ mkdir sidekiq cd sidekiq
nano run
#!/bin/sh
cd /home/deployer/application/current/
#!/bin/bash | |
# Don't forget chmod +x up.sh | |
# Installation: | |
# brew install jq | |
# | |
# Define function in ~/.zshrc | |
# container_name() { | |
# docker ps --format "{{.Names}}" | grep "app-1" |
sudo apt-get install runit
cd /etc/sv/ mkdir sidekiq cd sidekiq
nano run
#!/bin/sh
cd /home/deployer/application/current/
require 'json' | |
# Example ruby hash string which exercises all of the permutations of position and type | |
# See http://json.org/ | |
ruby_hash_text='{"alpha"=>{"first second > third"=>"first second > third", "after comma > foo"=>:symbolvalue, "another after comma > foo"=>10}, "bravo"=>{:symbol=>:symbolvalue, :aftercomma=>10, :anotheraftercomma=>"first second > third"}, "charlie"=>{1=>10, 2=>"first second > third", 3=>:symbolvalue}, "delta"=>["first second > third", "after comma > foo"], "echo"=>[:symbol, :aftercomma], "foxtrot"=>[1, 2]}' | |
puts ruby_hash_text | |
# Transform object string symbols to quoted strings | |
ruby_hash_text.gsub!(/([{,]\s*):([^>\s]+)\s*=>/, '\1"\2"=>') |
class MyJob < ActiveJob::Base | |
queue_as :urgent | |
rescue_from(NoResultsError) do | |
retry_job wait: 5.minutes, queue: :default | |
end | |
def perform(*args) | |
MyService.call(*args) | |
end |