This file contains hidden or 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
| #!/usr/bin/env zsh | |
| # or #!/usr/bin/env bash | |
| function rvm_init(){ | |
| RVM_VERSION=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}') | |
| RVM_GEMSET=$(basename $(PWD)) | |
| for i in "$@" | |
| do |
This file contains hidden or 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
| # this is a dirty implementation of logger that | |
| # compiles AR queries with trace into /last_request_log.html | |
| # the snippet is useful when optimizing performance of the endpoint | |
| class QueryLogSubscriber < ActiveSupport::LogSubscriber | |
| TRACE_LEVEL = :app | |
| LINES = 5 | |
| IGNORE_CACHED_QUERIES = false | |
| def initialize |
This file contains hidden or 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
| #!/bin/bash | |
| # Variable DELAYED_JOB_ARGS contains the arguments for delayed jobs for, e.g. defining queues and worker pools. | |
| # function that is called when the docker container should stop. It stops the delayed job processes | |
| _term() { | |
| echo "Caught SIGTERM signal! Stopping delayed jobs !" | |
| # unbind traps | |
| trap - SIGTERM | |
| trap - TERM |
OlderNewer