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
diff --git a/lib/delayed/backend/shared_spec.rb b/lib/delayed/backend/shared_spec.rb | |
index 8dc94eb..7a8caa6 100644 | |
--- a/lib/delayed/backend/shared_spec.rb | |
+++ b/lib/delayed/backend/shared_spec.rb | |
@@ -289,16 +289,18 @@ shared_examples_for "a delayed_job backend" do | |
end | |
it "reads five jobs" do | |
- pending | |
- described_class.should_receive(:find_available).with(anything, 5, anything).and_return([]) |
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
class Message | |
include ActiveModel::Conversion | |
include ActiveModel::Validations | |
extend ActiveModel::Naming | |
def initialize(attributes = {}) | |
attributes.each do |key, value| | |
eval "class << self; attr_accessor :#{key}; end" | |
send("#{key}=", value) | |
end |
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
class Message | |
include ActiveModel::Conversion | |
include ActiveModel::Validations | |
extend ActiveModel::Naming | |
attr_reader :attributes | |
def initialize(attributes = {}) | |
@attributes = attributes |
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
--- src/http/ngx_http_variables.c.orig 2011-05-11 10:44:09.000000000 -0400 | |
+++ src/http/ngx_http_variables.c 2011-05-11 10:47:25.000000000 -0400 | |
@@ -93,6 +93,9 @@ | |
static ngx_int_t ngx_http_variable_pid(ngx_http_request_t *r, | |
ngx_http_variable_value_t *v, uintptr_t data); | |
+static ngx_int_t ngx_http_variable_start_time(ngx_http_request_t *r, | |
+ ngx_http_variable_value_t *v, uintptr_t data); | |
+ | |
/* |
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
def forked! | |
ActiveRecord::Base.connection.reconnect! | |
Rails.cache.instance_variable_get(:@data).reset | |
Mongoid.config.master.connection.close | |
load File.join(RAILS_ROOT, 'config/initializers/mongoid.rb') | |
end | |
def run(job) | |
runtime = Benchmark.realtime do | |
fork 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
_rvm_cd_complete () | |
{ | |
local cur matches i j | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
j=${#COMPREPLY[@]} | |
for dir in $(echo $CDPATH | tr -s ':' ' ') ; do | |
for i in $( compgen -d $dir/$cur ) ; do | |
i="${i}/" |
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
worker = Delayed::Worker.new(:min_priority => ENV['MIN_PRIORITY'], :max_priority => ENV['MAX_PRIORITY']) | |
begin | |
worker.say "Starting job worker" | |
trap('TERM') { worker.say 'Exiting...'; $exit = true } | |
trap('INT') { worker.say 'Exiting...'; $exit = true } | |
loop do | |
result = nil |
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
# Regex to find <% ... %> which likely should be <%= ... %> | |
# Excludes: | |
# <% @.* | |
# <% end.* | |
# <% else.* | |
# <% elsif.* | |
# <% if[ (].* | |
# <% unless.* | |
/<% ([^e@ui]|e[^nl]|en[^d]|el[^s]|els[^ei]|elsi[^f]|u[^n]|un[^l]|unl[^e]|unle[^s]|unles[^s]|i[^f]|if[^ (])/ |
NewerOlder