procrastinator 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/RELEASE_NOTES.md +15 -1
- data/lib/procrastinator/queue.rb +3 -3
- data/lib/procrastinator/scheduler.rb +5 -4
- data/lib/procrastinator/version.rb +1 -1
- metadata +2 -3
- data/.travis.yml +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51731c709ddfb60d6a9bd082e2fec2d2c0d71da125311dd54e77778c206f662f
|
4
|
+
data.tar.gz: 95153dd8707910af0a3ee9c54cc48e74ad25e3a2eca8f7f69e7b042a838f8ba2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/procrastinator/queue.rb
CHANGED
@@ -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 [
|
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 [
|
15
|
+
# @return [Integer] Maximum number of attempts for tasks in this queue.
|
16
16
|
# @!attribute [r] :update_period
|
17
|
-
# @return [
|
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
|
6
|
+
# A Scheduler object provides the API for client applications to manage scheduled tasks.
|
7
7
|
#
|
8
|
-
# Use #
|
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
|
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)
|
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.
|
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-
|
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