stormtroopers 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,15 +6,6 @@ require 'active_support/hash_with_indifferent_access'
6
6
  require_relative "./already_running"
7
7
 
8
8
 
9
- if ENV["DJ_SPEED"] == "ludicrous"
10
- # Go to ludicrous speed (http://www.youtube.com/watch?v=mk7VWcuVOf0) by
11
- # overriding Delayed::Job#reserve to do the bare minimum to return a job.
12
- # This will cause all of our workers to pick up jobs from ANY queue, so use
13
- # with caution!
14
-
15
- end
16
-
17
-
18
9
  module Stormtroopers
19
10
  class Manager
20
11
  include Singleton
@@ -34,9 +25,8 @@ module Stormtroopers
34
25
  logger.info "Ludicrous speed? Sir! we have never gone that fast before, I dont know if the ship can take it! Whats the matter Colonel Sanders? CHICKEN?!"
35
26
  puts "Ludicrous speed? Sir! we have never gone that fast before, I dont know if the ship can take it! Whats the matter Colonel Sanders? CHICKEN?!"
36
27
  Delayed::Backend::Mongoid::Job.class_eval do
37
- def self.reserve(worker, max_run_time = Worker.max_run_time)
38
- where(failed_at: nil, locked_at: nil).find_and_modify({"$set" => {locked_at: db_time_now, locked_by: worker.name}}, new: true)
39
- end
28
+ def self.reserve(worker, max_run_time = Worker.max_run_time)
29
+ where(failed_at: nil, locked_at: nil).find_and_modify({"$set" => {locked_at: db_time_now, locked_by: worker.name}}, new: true)
40
30
  end
41
31
  end
42
32
  end
@@ -1,3 +1,3 @@
1
1
  module Stormtroopers
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stormtroopers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: