resque_admin-scheduler 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 504a3f974c00e057d1301dd2d9569258cf077b6b
4
- data.tar.gz: 674a66930efa2d6c88ff6af4152935eae7bc2bd9
3
+ metadata.gz: 3e5a8a61a51bbfee69f4abb2faa779f948658bce
4
+ data.tar.gz: 8f9e774b9ab0a1339274f4ca7d3de16664ab911d
5
5
  SHA512:
6
- metadata.gz: e0eee0df86a771ff90aa2cf510e70af2bad988c80cabc5689e34d27ab25a81c018cb540c209acbef7ce58e3daf34cb81bf19cc98bb32922cd8db7f58cb261013
7
- data.tar.gz: 9b781e8d53530107b8afc51e5abe7ccb89f42c5763a6d67413bc13f3b3b847e75332cd999d379213c873b2ebc687287710def25a2dc0a2f3471bfd7a2498f16b
6
+ metadata.gz: 526b76d3436f2ea29b0a0d7ca0e2ed99ccca16f368e163412f3ec77290bd0578ff8c8f7e5f41f173570b507d9ec4415e44d1f00f036b6553fc628ac7d563c3d8
7
+ data.tar.gz: 743b74596da7a6d8e38486797f662fb18a124aae67f4b014973c319b3b51cf2ad54f143a1fe0bec71253fb2ffb862931a7d7bd176998296d0b464f7289c71bb8
@@ -1,4 +1,4 @@
1
1
  # vim:fileencoding=utf-8
2
- require_relative 'resque_admin/scheduler'
2
+ require_relative 'resque/scheduler'
3
3
 
4
4
  ResqueAdmin.extend ResqueAdmin::Scheduler::Extension
@@ -9,10 +9,10 @@ require_relative 'scheduler/failure_handler'
9
9
 
10
10
  module ResqueAdmin
11
11
  module Scheduler
12
- autoload :Cli, 'resque_admin/scheduler/cli'
13
- autoload :Extension, 'resque_admin/scheduler/extension'
14
- autoload :Util, 'resque_admin/scheduler/util'
15
- autoload :VERSION, 'resque_admin/scheduler/version'
12
+ autoload :Cli, 'resque/scheduler/cli'
13
+ autoload :Extension, 'resque/scheduler/extension'
14
+ autoload :Util, 'resque/scheduler/util'
15
+ autoload :VERSION, 'resque/scheduler/version'
16
16
 
17
17
  private
18
18
 
@@ -38,8 +38,8 @@ module ResqueAdmin
38
38
  # trap signals
39
39
  register_signal_handlers
40
40
 
41
- # Quote from the resque_admin/worker.
42
- # Fix buffering so we can `rake resque_admin:scheduler > scheduler.log` and
41
+ # Quote from the resque/worker.
42
+ # Fix buffering so we can `rake resque:scheduler > scheduler.log` and
43
43
  # get output from the child in there.
44
44
  $stdout.sync = true
45
45
  $stderr.sync = true
@@ -238,7 +238,7 @@ module ResqueAdmin
238
238
  job_config[:queue] ||
239
239
  ResqueAdmin.queue_from_class(klass)
240
240
  # Support custom job classes like those that inherit from
241
- # ResqueAdmin::JobWithStatus (resque_admin-status)
241
+ # ResqueAdmin::JobWithStatus (resque-status)
242
242
  job_klass = job_config['custom_job_class']
243
243
  if job_klass && job_klass != 'ResqueAdmin::Job'
244
244
  # The custom job class API must offer a static "scheduled" method. If
@@ -440,7 +440,7 @@ module ResqueAdmin
440
440
  end
441
441
 
442
442
  def internal_name
443
- "resque_admin-scheduler-#{ResqueAdmin::Scheduler::VERSION}"
443
+ "resque-scheduler-#{ResqueAdmin::Scheduler::VERSION}"
444
444
  end
445
445
  end
446
446
  end
@@ -20,9 +20,9 @@ module ResqueAdmin
20
20
 
21
21
  class Cli
22
22
  BANNER = <<-EOF.gsub(/ {6}/, '')
23
- Usage: resque_admin-scheduler [options]
23
+ Usage: resque-scheduler [options]
24
24
 
25
- Runs a resque_admin scheduler process directly (rather than via rake).
25
+ Runs a resque scheduler process directly (rather than via rake).
26
26
 
27
27
  EOF
28
28
  OPTIONS = [
@@ -25,7 +25,7 @@ module ResqueAdmin
25
25
  return false unless plugin.run_before_schedule_hooks(klass, *args)
26
26
 
27
27
  if ResqueAdmin.inline? || timestamp.to_i < Time.now.to_i
28
- # Just create the job and let resque_admin perform it right away with
28
+ # Just create the job and let resque perform it right away with
29
29
  # inline. If the class is a custom job class, call self#scheduled
30
30
  # on it. This allows you to do things like
31
31
  # ResqueAdmin.enqueue_at(timestamp, CustomJobClass, :opt1 => val1).
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ### Locking the scheduler process
4
4
  #
5
- # There are two places in resque_admin-scheduler that need to be synchonized in order
5
+ # There are two places in resque-scheduler that need to be synchonized in order
6
6
  # to be able to run redundant scheduler processes while ensuring jobs don't get
7
7
  # queued multiple times when the master process changes.
8
8
  #
@@ -23,7 +23,7 @@
23
23
  # should remain the master as long as it can rather than a simple SETNX which
24
24
  # would result in the master roll being passed around frequently.
25
25
  #
26
- # Locking Scheme: Each resque_admin-scheduler process attempts to get the master lock
26
+ # Locking Scheme: Each resque-scheduler process attempts to get the master lock
27
27
  # via SETNX. Once obtained, it sets the expiration for 3 minutes
28
28
  # (configurable). The master process continually updates the timeout on the
29
29
  # lock key to be 3 minutes in the future in it's loop(s) (see `run`) and when
@@ -51,7 +51,7 @@ module ResqueAdmin
51
51
 
52
52
  def text_formatter
53
53
  proc do |severity, datetime, _progname, msg|
54
- "resque_admin-scheduler: [#{severity}] #{datetime.iso8601}: #{msg}\n"
54
+ "resque-scheduler: [#{severity}] #{datetime.iso8601}: #{msg}\n"
55
55
  end
56
56
  end
57
57
 
@@ -59,7 +59,7 @@ module ResqueAdmin
59
59
  proc do |severity, datetime, progname, msg|
60
60
  require 'json'
61
61
  JSON.dump(
62
- name: 'resque_admin-scheduler',
62
+ name: 'resque-scheduler',
63
63
  progname: progname,
64
64
  level: severity,
65
65
  timestamp: datetime.iso8601,
@@ -19,7 +19,7 @@ module ResqueAdmin
19
19
  # Hash keys can be anything and are used to describe and reference
20
20
  # the scheduled job. If the "class" argument is missing, the key
21
21
  # is used implicitly as "class" argument - in the "MakeTea" example,
22
- # "MakeTea" is used both as job name and resque_admin worker class.
22
+ # "MakeTea" is used both as job name and resque worker class.
23
23
  #
24
24
  # Any jobs that were in the old schedule, but are not
25
25
  # present in the new schedule, will be removed.
@@ -30,7 +30,7 @@ module ResqueAdmin
30
30
  # usage for valid syntax. If :cron is present it will take precedence
31
31
  # over :every.
32
32
  #
33
- # :class must be a resque_admin worker class. If it is missing, the job name
33
+ # :class must be a resque worker class. If it is missing, the job name
34
34
  # (hash key) will be used as :class.
35
35
  #
36
36
  # :args can be any yaml which will be converted to a ruby literal and
@@ -66,7 +66,7 @@ module ResqueAdmin
66
66
  config_args = config['args'] || config[:args] || {}
67
67
  config_args = config_args.merge(submitted_args)
68
68
 
69
- # Insert the args hash into config and queue the resque_admin job
69
+ # Insert the args hash into config and queue the resque job
70
70
  config = config.merge('args' => config_args)
71
71
  ResqueAdmin::Scheduler.enqueue_from_config(config)
72
72
  redirect u('/overview')
@@ -1,5 +1,5 @@
1
1
  <h1>Delayed Jobs</h1>
2
- <%- size = resque_admin.delayed_queue_schedule_size %>
2
+ <%- size = resque.delayed_queue_schedule_size %>
3
3
 
4
4
  <%= scheduler_view :search_form, layout: false %>
5
5
 
@@ -25,7 +25,7 @@
25
25
  <th>Args</th>
26
26
  <th>All schedules</th>
27
27
  </tr>
28
- <% resque_admin.delayed_queue_peek(start, 20).each do |timestamp| %>
28
+ <% resque.delayed_queue_peek(start, 20).each do |timestamp| %>
29
29
  <tr>
30
30
  <td>
31
31
  <form action="<%= u "/delayed/queue_now" %>" method="post">
@@ -34,8 +34,8 @@
34
34
  </form>
35
35
  </td>
36
36
  <td><a href="<%= u "delayed/#{timestamp}" %>"><%= format_time(Time.at(timestamp)) %></a></td>
37
- <td><%= delayed_timestamp_size = resque_admin.delayed_timestamp_size(timestamp) %></td>
38
- <% job = resque_admin.delayed_timestamp_peek(timestamp, 0, 1).first %>
37
+ <td><%= delayed_timestamp_size = resque.delayed_timestamp_size(timestamp) %></td>
38
+ <% job = resque.delayed_timestamp_peek(timestamp, 0, 1).first %>
39
39
  <td>
40
40
  <% if job && delayed_timestamp_size == 1 %>
41
41
  <%= h(job['class']) %>
@@ -2,14 +2,14 @@
2
2
 
3
3
  <h1>Delayed jobs scheduled for <%= format_time(Time.at(timestamp)) %></h1>
4
4
 
5
- <p class='sub'>Showing <%= start = params[:start].to_i %> to <%= start + 20 %> of <b><%=size = resque_admin.delayed_timestamp_size(timestamp)%></b> jobs</p>
5
+ <p class='sub'>Showing <%= start = params[:start].to_i %> to <%= start + 20 %> of <b><%=size = resque.delayed_timestamp_size(timestamp)%></b> jobs</p>
6
6
 
7
7
  <table class='jobs'>
8
8
  <tr>
9
9
  <th>Class</th>
10
10
  <th>Args</th>
11
11
  </tr>
12
- <% jobs = resque_admin.delayed_timestamp_peek(timestamp, start, 20) %>
12
+ <% jobs = resque.delayed_timestamp_peek(timestamp, start, 20) %>
13
13
  <% jobs.each do |job| %>
14
14
  <tr>
15
15
  <td class='class'><%= job['class'] %></td>
@@ -3,7 +3,7 @@
3
3
  require 'resque_admin/tasks'
4
4
  require 'resque_admin-scheduler'
5
5
 
6
- namespace :resque_admin do
6
+ namespace :resque do
7
7
  task :setup
8
8
 
9
9
  def scheduler_cli
@@ -20,6 +20,6 @@ namespace :resque_admin do
20
20
 
21
21
  task :scheduler_setup do
22
22
  scheduler_cli.parse_options
23
- Rake::Task['resque_admin:setup'].invoke unless scheduler_cli.pre_setup
23
+ Rake::Task['resque:setup'].invoke unless scheduler_cli.pre_setup
24
24
  end
25
25
  end
@@ -3,10 +3,10 @@
3
3
  module ResqueAdmin
4
4
  module Scheduler
5
5
  class Util
6
- # In order to upgrade to resque_admin(1.25) which has deprecated following
6
+ # In order to upgrade to resque(1.25) which has deprecated following
7
7
  # methods, we just added these usefull helpers back to use in ResqueAdmin
8
8
  # Scheduler. refer to:
9
- # https://github.com/resque_admin/resque_admin-scheduler/pull/273
9
+ # https://github.com/resque/resque-scheduler/pull/273
10
10
 
11
11
  def self.constantize(camel_cased_word)
12
12
  camel_cased_word = camel_cased_word.to_s
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ResqueAdmin
4
4
  module Scheduler
5
- VERSION = '1.1.7'.freeze
5
+ VERSION = '1.1.8'.freeze
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque_admin-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath