resque 1.27.1 → 1.27.2
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.
Potentially problematic release.
This version of resque might be problematic. Click here for more details.
- checksums.yaml +4 -4
 - data/HISTORY.md +6 -0
 - data/README.markdown +8 -1
 - data/lib/resque/data_store.rb +14 -7
 - data/lib/resque/server/public/style.css +2 -2
 - data/lib/resque/version.rb +1 -1
 - data/lib/resque/worker.rb +1 -0
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c9757198382c0b8e5cf383fc49fe82ce4f59933e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 6dbda5f17bf9cb44f99c18724b0cb6a6e1422e73
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 45cc843a75953f9b5e08ebcded0caafa7da8a833489d6c48922b68d6fecc3192ddd4dbce3f77dffc45cf187a89e6a1e79509a2043e9ce11081996e8466561d75
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 6d5c2fdc451fd17b50b1d82a7f7ed94a25aad40af6cc0515e0cace4304944b0539fee3cc42c64a8608db64135fec5d79db0f9fb6c5f1d13531794923078c4f96
         
     | 
    
        data/HISTORY.md
    CHANGED
    
    
    
        data/README.markdown
    CHANGED
    
    | 
         @@ -195,7 +195,7 @@ We plan to provide first class `async` support in a future release. 
     | 
|
| 
       195 
195 
     | 
    
         | 
| 
       196 
196 
     | 
    
         
             
            If a job raises an exception, it is logged and handed off to the
         
     | 
| 
       197 
197 
     | 
    
         
             
            `Resque::Failure` module. Failures are logged either locally in Redis
         
     | 
| 
       198 
     | 
    
         
            -
            or using some different backend. To see exceptions while developing, 
     | 
| 
      
 198 
     | 
    
         
            +
            or using some different backend. To see exceptions while developing,
         
     | 
| 
       199 
199 
     | 
    
         
             
            use VERBOSE env variable, see details below under Logging.
         
     | 
| 
       200 
200 
     | 
    
         | 
| 
       201 
201 
     | 
    
         
             
            For example, Resque ships with Airbrake support. To configure it, put
         
     | 
| 
         @@ -634,6 +634,13 @@ require 'your/app' 
     | 
|
| 
       634 
634 
     | 
    
         
             
            require 'resque/tasks'
         
     | 
| 
       635 
635 
     | 
    
         
             
            ```
         
     | 
| 
       636 
636 
     | 
    
         | 
| 
      
 637 
     | 
    
         
            +
            If you're using Rails 5.x, include the following in lib/tasks/resque.rb:
         
     | 
| 
      
 638 
     | 
    
         
            +
             
     | 
| 
      
 639 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 640 
     | 
    
         
            +
            require 'resque/tasks'
         
     | 
| 
      
 641 
     | 
    
         
            +
            task 'resque:setup' => :environment
         
     | 
| 
      
 642 
     | 
    
         
            +
            ```
         
     | 
| 
      
 643 
     | 
    
         
            +
             
     | 
| 
       637 
644 
     | 
    
         
             
            Now:
         
     | 
| 
       638 
645 
     | 
    
         | 
| 
       639 
646 
     | 
    
         
             
                $ QUEUE=* rake resque:work
         
     | 
    
        data/lib/resque/data_store.rb
    CHANGED
    
    | 
         @@ -7,11 +7,12 @@ module Resque 
     | 
|
| 
       7 
7 
     | 
    
         
             
                HEARTBEAT_KEY = "workers:heartbeat"
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
                def initialize(redis)
         
     | 
| 
       10 
     | 
    
         
            -
                  @redis 
     | 
| 
       11 
     | 
    
         
            -
                  @queue_access 
     | 
| 
       12 
     | 
    
         
            -
                  @failed_queue_access 
     | 
| 
       13 
     | 
    
         
            -
                  @workers 
     | 
| 
       14 
     | 
    
         
            -
                  @stats_access 
     | 
| 
      
 10 
     | 
    
         
            +
                  @redis                = redis
         
     | 
| 
      
 11 
     | 
    
         
            +
                  @queue_access         = QueueAccess.new(@redis)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  @failed_queue_access  = FailedQueueAccess.new(@redis)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  @workers              = Workers.new(@redis)
         
     | 
| 
      
 14 
     | 
    
         
            +
                  @stats_access         = StatsAccess.new(@redis)
         
     | 
| 
      
 15 
     | 
    
         
            +
                  @redis_time_available = redis_time_available?
         
     | 
| 
       15 
16 
     | 
    
         
             
                end
         
     | 
| 
       16 
17 
     | 
    
         | 
| 
       17 
18 
     | 
    
         
             
                def_delegators :@queue_access, :push_to_queue,
         
     | 
| 
         @@ -91,10 +92,17 @@ module Resque 
     | 
|
| 
       91 
92 
     | 
    
         
             
                end
         
     | 
| 
       92 
93 
     | 
    
         | 
| 
       93 
94 
     | 
    
         
             
                def server_time
         
     | 
| 
       94 
     | 
    
         
            -
                  time, _ = @redis.time
         
     | 
| 
      
 95 
     | 
    
         
            +
                  time, _ = @redis_time_available ? @redis.time : Time.now
         
     | 
| 
       95 
96 
     | 
    
         
             
                  Time.at(time)
         
     | 
| 
       96 
97 
     | 
    
         
             
                end
         
     | 
| 
       97 
98 
     | 
    
         | 
| 
      
 99 
     | 
    
         
            +
                def redis_time_available?
         
     | 
| 
      
 100 
     | 
    
         
            +
                  @redis.time
         
     | 
| 
      
 101 
     | 
    
         
            +
                rescue Redis::CommandError
         
     | 
| 
      
 102 
     | 
    
         
            +
                  false
         
     | 
| 
      
 103 
     | 
    
         
            +
                end
         
     | 
| 
      
 104 
     | 
    
         
            +
                private :redis_time_available?
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
       98 
106 
     | 
    
         
             
                class QueueAccess
         
     | 
| 
       99 
107 
     | 
    
         
             
                  def initialize(redis)
         
     | 
| 
       100 
108 
     | 
    
         
             
                    @redis = redis
         
     | 
| 
         @@ -299,7 +307,6 @@ module Resque 
     | 
|
| 
       299 
307 
     | 
    
         
             
                  def redis_key_for_worker_start_time(worker)
         
     | 
| 
       300 
308 
     | 
    
         
             
                    "#{redis_key_for_worker(worker)}:started"
         
     | 
| 
       301 
309 
     | 
    
         
             
                  end
         
     | 
| 
       302 
     | 
    
         
            -
             
     | 
| 
       303 
310 
     | 
    
         
             
                end
         
     | 
| 
       304 
311 
     | 
    
         | 
| 
       305 
312 
     | 
    
         
             
                class StatsAccess
         
     | 
| 
         @@ -8,7 +8,7 @@ body { padding:0; margin:0; } 
     | 
|
| 
       8 
8 
     | 
    
         
             
            .header ul li a:hover { background:#333;}
         
     | 
| 
       9 
9 
     | 
    
         
             
            .header ul li.current a { background:#ce1212; font-weight:bold; color:#fff;}
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
     | 
    
         
            -
            .header .namespace { position: absolute; right: 75px; top:  
     | 
| 
      
 11 
     | 
    
         
            +
            .header .namespace { position: absolute; right: 75px; top: 12px; color: #FFF; font-weight: bold; }
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
            .subnav { padding:2px 5% 7px 5%; background:#ce1212; font-size:90%;}
         
     | 
| 
       14 
14 
     | 
    
         
             
            .subnav li { display:inline;}
         
     | 
| 
         @@ -88,4 +88,4 @@ body { padding:0; margin:0; } 
     | 
|
| 
       88 
88 
     | 
    
         | 
| 
       89 
89 
     | 
    
         
             
            #failed tr.total td {background-color: #FFECEC; color: #D37474; font-size: 15px; font-weight: bold;}
         
     | 
| 
       90 
90 
     | 
    
         
             
            #failed .center {text-align: center;}
         
     | 
| 
       91 
     | 
    
         
            -
            #failed .failed_class { padding-left: 20px; font-size:12px; }
         
     | 
| 
      
 91 
     | 
    
         
            +
            #failed .failed_class { padding-left: 20px; font-size:12px; }
         
     | 
    
        data/lib/resque/version.rb
    CHANGED
    
    
    
        data/lib/resque/worker.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: resque
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.27. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.27.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Chris Wanstrath
         
     | 
| 
         @@ -10,7 +10,7 @@ authors: 
     | 
|
| 
       10 
10 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       11 
11 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       12 
12 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       13 
     | 
    
         
            -
            date: 2017-02- 
     | 
| 
      
 13 
     | 
    
         
            +
            date: 2017-02-20 00:00:00.000000000 Z
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies:
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       16 
16 
     | 
    
         
             
              name: redis-namespace
         
     | 
| 
         @@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       186 
186 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       187 
187 
     | 
    
         
             
            requirements: []
         
     | 
| 
       188 
188 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       189 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 189 
     | 
    
         
            +
            rubygems_version: 2.6.10
         
     | 
| 
       190 
190 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       191 
191 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       192 
192 
     | 
    
         
             
            summary: Resque is a Redis-backed queueing system.
         
     |