procrastinator 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: e3d2c026b206d52c22ad9cb182fa7ea48ff2569eb99647a5cf75aa20e56bde5e
4
- data.tar.gz: 1a82220d0b7485bb3de7263fa6bc2265f1612601eab1769eb306c9a5930073ca
3
+ metadata.gz: 51731c709ddfb60d6a9bd082e2fec2d2c0d71da125311dd54e77778c206f662f
4
+ data.tar.gz: 95153dd8707910af0a3ee9c54cc48e74ad25e3a2eca8f7f69e7b042a838f8ba2
5
5
  SHA512:
6
- metadata.gz: bc20963d1541d72024af63effe933823162012deea562f04bbe4303c6c380b26476d8305b6a94551ac50424101e0d7a072d705d01dcbc1ba1f231cd5c51f3184
7
- data.tar.gz: 670bc2fe498c40a7c32d2557956321237d9307941397a5bd1c1c7c1718b24e3ceaaa24ee2b8e5960b9967120467b46ad3c3df313ed00ab3a6e77830e626937fb
6
+ metadata.gz: 076b5c80dcebb746405dc9a27992bc51665f90d5aeb40a67cd982e0b1eba66f8c4b85e65ba213d7e36ed27a7c736574e3cb396d5619d73a51e6877bc6df7dd99
7
+ data.tar.gz: 02574c2182eb4f7f6c861a413b6c3764bdb772c3201740b8460381543e16d78779963b9dc64a9e11d8fc12f4bf100196de8e730cab697cb9b495fa3c9e0bd5ff
data/RELEASE_NOTES.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Release Notes
2
2
 
3
+ ## 1.0.1 (2022-09-20)
4
+
5
+ ### Major Changes
6
+
7
+ * none
8
+
9
+ ### Minor Changes
10
+
11
+ * none
12
+
13
+ ### Bugfixes
14
+
15
+ * Fixed integration error in rescheduling tasks
16
+
3
17
  ## 1.0.0 (2022-09-18)
4
18
 
5
19
  ### Major Changes
@@ -32,7 +46,7 @@
32
46
  * `load_with` has been removed
33
47
  * Removed `task_attr` and `Procrastinator::Task` module. Tasks is now duck-type checked for accessors instead.
34
48
  * Added Rake tasks to manage process daemon
35
- * Times are passed to Task Store as a Ruby Time object instead of an epoch time integer
49
+ * Times are passed to Task Store as a Ruby Time object instead of an epoch time integer
36
50
  * `#delay` is now `#defer`
37
51
 
38
52
  ### Minor Changes
@@ -10,11 +10,11 @@ module Procrastinator
10
10
  # @!attribute [r] :task_class
11
11
  # @return [Class] Class that defines the work to be done for jobs in this queue.
12
12
  # @!attribute [r] :timeout
13
- # @return [Object] Duration (seconds) after which tasks in this queue should fail for taking too long.
13
+ # @return [Numeric] Duration (seconds) after which tasks in this queue should fail for taking too long.
14
14
  # @!attribute [r] :max_attempts
15
- # @return [Object] Maximum number of attempts for tasks in this queue.
15
+ # @return [Integer] Maximum number of attempts for tasks in this queue.
16
16
  # @!attribute [r] :update_period
17
- # @return [Pathname] Delay (seconds) between reloads of tasks from the task store.
17
+ # @return [Numeric] Delay (seconds) between reloads of tasks from the task store.
18
18
  class Queue
19
19
  extend Forwardable
20
20
 
@@ -3,9 +3,10 @@
3
3
  require 'stringio'
4
4
 
5
5
  module Procrastinator
6
- # A Scheduler object provides the API for client applications to manage delayed tasks.
6
+ # A Scheduler object provides the API for client applications to manage scheduled tasks.
7
7
  #
8
- # Use #delay to schedule new tasks, #reschedule to alter existing tasks, and #cancel to remove unwanted tasks.
8
+ # Use Scheduler#defer to schedule new tasks, Scheduler#reschedule to alter existing tasks, and Scheduler#cancel to
9
+ # remove unwanted tasks.
9
10
  #
10
11
  # @author Robin Miller
11
12
  class Scheduler
@@ -46,7 +47,7 @@ module Procrastinator
46
47
  #
47
48
  # @see TaskMetaData
48
49
  def reschedule(queue, identifier)
49
- UpdateProxy.new(@config, identifier: identifier.merge(queue: queue.to_s))
50
+ UpdateProxy.new(@config.queue(name: queue), identifier: identifier)
50
51
  end
51
52
 
52
53
  # Removes an existing task, as located by the given identifying information.
@@ -88,7 +89,7 @@ module Procrastinator
88
89
  class UpdateProxy
89
90
  def initialize(queue, identifier:)
90
91
  @queue = queue
91
- @identifier = identifier
92
+ @identifier = identifier.merge(queue: queue.name.to_sym)
92
93
  end
93
94
 
94
95
  def to(run_at: nil, expire_at: nil)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Procrastinator
4
4
  # Version number of this release
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: procrastinator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Miller
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-19 00:00:00.000000000 Z
11
+ date: 2022-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -147,7 +147,6 @@ files:
147
147
  - ".rspec"
148
148
  - ".rubocop.yml"
149
149
  - ".ruby-version"
150
- - ".travis.yml"
151
150
  - CODE_OF_CONDUCT.md
152
151
  - Gemfile
153
152
  - LICENSE.txt
data/.travis.yml DELETED
@@ -1,4 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.1
4
- before_install: gem install bundler -v 1.11.2