aranha-rails 0.8.3 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/aranha/address/delayed_job.rb +1 -0
- data/app/models/aranha/address/scheduling.rb +8 -1
- data/app/models/aranha/processor_configuration.rb +1 -0
- data/db/migrate/20230602212759_add_priority_to_aranha_processor_configurations.rb +7 -0
- data/lib/aranha/rails/manager.rb +1 -1
- data/lib/aranha/rails/version.rb +1 -1
- metadata +23 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df34de5939413cf8b0a8ac9a8185e06551953226a69ac9fafb08ed04b9ac8679
|
4
|
+
data.tar.gz: 8494ebfc1b7038fb91e076f50607eeb4543f47d128401b66ffd85b332e8094ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a4cd710166a2d1ed26c3e10f6b60821cc59b04884e4348ed1065230dbe958f7e1fe6075230432336770a3e0e31b6408de9cb89e542a484d0e6a7f7509f688c2
|
7
|
+
data.tar.gz: 02d01c2175b85069755f45a2c59e1043d7f49922d8a8dd0eaec687a34d1cb496e54d4b1363893029d404d8727bca2549c8f91ca4b5d68f917c5f3f24177433f1
|
@@ -11,6 +11,8 @@ module Aranha
|
|
11
11
|
module Scheduling
|
12
12
|
common_concern
|
13
13
|
|
14
|
+
DEFAULT_PRIORITY = 0
|
15
|
+
|
14
16
|
module ClassMethods
|
15
17
|
# @return [Array<Aranha::Address>]
|
16
18
|
def expired(time = ::Time.zone.now)
|
@@ -24,7 +26,8 @@ module Aranha
|
|
24
26
|
|
25
27
|
job = ::Delayed::Job.enqueue(
|
26
28
|
::Aranha::Address::DelayedJob.new(id),
|
27
|
-
queue: ::Aranha::Rails::Process::QUEUE
|
29
|
+
queue: ::Aranha::Rails::Process::QUEUE,
|
30
|
+
priority: priority
|
28
31
|
)
|
29
32
|
update!(delayed_job: job)
|
30
33
|
end
|
@@ -43,6 +46,10 @@ module Aranha
|
|
43
46
|
tries_count < ::Aranha::Processor::DEFAULT_MAX_TRIES
|
44
47
|
end
|
45
48
|
|
49
|
+
def priority
|
50
|
+
processor_configuration.if_present(DEFAULT_PRIORITY, &:priority)
|
51
|
+
end
|
52
|
+
|
46
53
|
def schedule?
|
47
54
|
processed_at.blank? && allow_retry? && delayed_job.blank? && enabled?
|
48
55
|
end
|
data/lib/aranha/rails/manager.rb
CHANGED
data/lib/aranha/rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aranha-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Put here the authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aranha
|
@@ -16,60 +16,48 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.19'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.19.2
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.19'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: 0.19.2
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aranha-parsers
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 0.14.3
|
39
|
+
version: '0.20'
|
43
40
|
type: :runtime
|
44
41
|
prerelease: false
|
45
42
|
version_requirements: !ruby/object:Gem::Requirement
|
46
43
|
requirements:
|
47
44
|
- - "~>"
|
48
45
|
- !ruby/object:Gem::Version
|
49
|
-
version: '0.
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 0.14.3
|
46
|
+
version: '0.20'
|
53
47
|
- !ruby/object:Gem::Dependency
|
54
48
|
name: eac_active_scaffold
|
55
49
|
requirement: !ruby/object:Gem::Requirement
|
56
50
|
requirements:
|
57
51
|
- - "~>"
|
58
52
|
- !ruby/object:Gem::Version
|
59
|
-
version: '0.
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 0.2.3
|
53
|
+
version: '0.3'
|
63
54
|
type: :runtime
|
64
55
|
prerelease: false
|
65
56
|
version_requirements: !ruby/object:Gem::Requirement
|
66
57
|
requirements:
|
67
58
|
- - "~>"
|
68
59
|
- !ruby/object:Gem::Version
|
69
|
-
version: '0.
|
70
|
-
- - ">="
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: 0.2.3
|
60
|
+
version: '0.3'
|
73
61
|
- !ruby/object:Gem::Dependency
|
74
62
|
name: eac_rails_delayed_job
|
75
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,7 +67,7 @@ dependencies:
|
|
79
67
|
version: '0.1'
|
80
68
|
- - ">="
|
81
69
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.1.
|
70
|
+
version: 0.1.4
|
83
71
|
type: :runtime
|
84
72
|
prerelease: false
|
85
73
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -89,41 +77,41 @@ dependencies:
|
|
89
77
|
version: '0.1'
|
90
78
|
- - ">="
|
91
79
|
- !ruby/object:Gem::Version
|
92
|
-
version: 0.1.
|
80
|
+
version: 0.1.4
|
93
81
|
- !ruby/object:Gem::Dependency
|
94
82
|
name: eac_rails_utils
|
95
83
|
requirement: !ruby/object:Gem::Requirement
|
96
84
|
requirements:
|
97
85
|
- - "~>"
|
98
86
|
- !ruby/object:Gem::Version
|
99
|
-
version: '0.
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 0.17.1
|
87
|
+
version: '0.18'
|
103
88
|
type: :runtime
|
104
89
|
prerelease: false
|
105
90
|
version_requirements: !ruby/object:Gem::Requirement
|
106
91
|
requirements:
|
107
92
|
- - "~>"
|
108
93
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0.
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: 0.17.1
|
94
|
+
version: '0.18'
|
113
95
|
- !ruby/object:Gem::Dependency
|
114
96
|
name: eac_ruby_utils
|
115
97
|
requirement: !ruby/object:Gem::Requirement
|
116
98
|
requirements:
|
117
99
|
- - "~>"
|
118
100
|
- !ruby/object:Gem::Version
|
119
|
-
version: '0.
|
101
|
+
version: '0.117'
|
102
|
+
- - ">="
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 0.117.1
|
120
105
|
type: :runtime
|
121
106
|
prerelease: false
|
122
107
|
version_requirements: !ruby/object:Gem::Requirement
|
123
108
|
requirements:
|
124
109
|
- - "~>"
|
125
110
|
- !ruby/object:Gem::Version
|
126
|
-
version: '0.
|
111
|
+
version: '0.117'
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 0.117.1
|
127
115
|
- !ruby/object:Gem::Dependency
|
128
116
|
name: rails
|
129
117
|
requirement: !ruby/object:Gem::Requirement
|
@@ -190,6 +178,7 @@ files:
|
|
190
178
|
- db/migrate/20210721185222_add_last_error_to_aranha_addresses.rb
|
191
179
|
- db/migrate/20210814220540_create_aranha_processor_configurations.rb
|
192
180
|
- db/migrate/20210815160543_add_enabled_to_aranha_processor_configurations.rb
|
181
|
+
- db/migrate/20230602212759_add_priority_to_aranha_processor_configurations.rb
|
193
182
|
- lib/aranha/rails.rb
|
194
183
|
- lib/aranha/rails/engine.rb
|
195
184
|
- lib/aranha/rails/fixtures_download.rb
|