active_job_k8s 1.0.0.pre.beta.1 → 1.0.0.pre.beta.2

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: d5b40e92ba26450d0cb797737e03552b8f89fea8dc1f4ae9da53d924b34e23ad
4
- data.tar.gz: 6d30c4b30a4a1bf180e5617c8ce4582f27862d80a2ed2b1959dc1c57f782d123
3
+ metadata.gz: 0e243c2919c8dc8eace85844dcf16ef254f8d800792cbea13dff1f127131e0d9
4
+ data.tar.gz: ef5337a68ea326948f3a8f4797847dfa2778d28b1de57de9d2fc32ba32d8f53d
5
5
  SHA512:
6
- metadata.gz: a1f159b9d818fc7f1e94f19cd69ffa6288a19e453c444a1fc6ff5470613f46366b0a3a4cef266c488ae7062f0a93ff8872cced39182e0b0feda9f57c3de90318
7
- data.tar.gz: 3042cee4f989340e528d5f2d153fc954489e43edd0c152fc32255ff717bdeeceb254db5db45c48740df401c0dda1eb5e58a3910ca44f507251bd1bfa3c7e9c51
6
+ metadata.gz: 711362257e7c1d9cae487d8759bdeac69567a9a2a466563de0bc58e24231c39141c8534493a3377e9659709b4caba0e1613b71a18e2d3b0e45190de716a2aedf
7
+ data.tar.gz: 751297bd4a799d64fa71752451745fbd4e704ddab6197de37a6a9d6ad32d73423f8f1e16fd3a850ffdd225e984fc752b924576056e2528790efefb98e0e90cff
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # V 1.0.0-beta.1
2
+ - Limit number of concurrent jobs
3
+
1
4
  # V 0.2.0
2
5
  - change position of default manifest
3
6
  - implementation of delayed job to be scheduled in a specific moment
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_job_k8s (0.2.0)
4
+ active_job_k8s (1.0.0.pre.beta.2)
5
5
  http (>= 5.0)
6
6
  kubeclient (~> 4.0)
7
7
  rails (>= 6.0, < 8)
@@ -68,7 +68,7 @@ GEM
68
68
  minitest (>= 5.1)
69
69
  tzinfo (~> 2.0)
70
70
  zeitwerk (~> 2.3)
71
- addressable (2.8.1)
71
+ addressable (2.8.5)
72
72
  public_suffix (>= 2.0.2, < 6.0)
73
73
  builder (3.2.4)
74
74
  concurrent-ruby (1.1.10)
@@ -96,7 +96,7 @@ GEM
96
96
  http-form_data (2.3.0)
97
97
  i18n (1.12.0)
98
98
  concurrent-ruby (~> 1.0)
99
- jsonpath (1.1.2)
99
+ jsonpath (1.1.3)
100
100
  multi_json
101
101
  kubeclient (4.11.0)
102
102
  http (>= 3.0, < 6.0)
@@ -116,9 +116,9 @@ GEM
116
116
  net-smtp
117
117
  marcel (1.0.2)
118
118
  method_source (1.0.0)
119
- mime-types (3.4.1)
119
+ mime-types (3.5.1)
120
120
  mime-types-data (~> 3.2015)
121
- mime-types-data (3.2022.0105)
121
+ mime-types-data (3.2023.0808)
122
122
  mini_mime (1.1.2)
123
123
  minitest (5.17.0)
124
124
  multi_json (1.15.0)
@@ -135,7 +135,7 @@ GEM
135
135
  nio4r (2.5.8)
136
136
  nokogiri (1.13.10-x86_64-linux)
137
137
  racc (~> 1.4)
138
- public_suffix (5.0.1)
138
+ public_suffix (5.0.3)
139
139
  racc (1.6.2)
140
140
  rack (2.2.5)
141
141
  rack-test (2.0.2)
data/README.md CHANGED
@@ -33,7 +33,7 @@ Or install it yourself as:
33
33
  ### Adapter Configuration
34
34
  Configure the KubeClient as documented here: https://github.com/ManageIQ/kubeclient and instantiate the adapter.
35
35
 
36
- ES Local with default kind cluster:
36
+ Example: Local with default kind cluster:
37
37
  ```ruby
38
38
 
39
39
  kubeclient_config = Kubeclient::Config.read(ENV['KUBECONFIG'] || File.join(Dir.home, '/.kube/config'))
@@ -43,7 +43,7 @@ ES Local with default kind cluster:
43
43
  )
44
44
 
45
45
  ```
46
- ES production configuration:
46
+ Example: production configuration:
47
47
  ```ruby
48
48
  Rails.application.configure do
49
49
 
@@ -139,7 +139,7 @@ roleRef:
139
139
 
140
140
  Inside you job you should describe the initial manifest for the [KubernetesJob](https://kubernetes.io/docs/concepts/workloads/controllers/job/)
141
141
 
142
- ES:
142
+ Example:
143
143
  ```ruby
144
144
  class HelloWorldJob < ApplicationJob
145
145
  queue_as :default
@@ -161,7 +161,7 @@ The command will be inserted by the gem if not present.
161
161
  command: ["rails"]
162
162
  args: ["active_job_k8s:run_job"]
163
163
  ```
164
- To the name of the Job wi will append a timestamp to make it uniq
164
+ To the name of the Job we will append a timestamp to make it uniq
165
165
 
166
166
  ## Development
167
167
 
data/bin/teardown CHANGED
@@ -3,5 +3,5 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
- rm -fr spec/dummy
6
+ sudo rm -fr spec/dummy
7
7
  kind delete cluster -n active-job-cluster
@@ -7,14 +7,18 @@ module ActiveJobK8s
7
7
  end
8
8
 
9
9
  server do
10
- puts "=> START ActiveJobK8s - ControlLoop sleep [5]"
11
- Thread.new do
12
- Rails.application.reloader.wrap do
13
- loop do
14
- Rails.application.config.active_job.queue_adapter.scheduler.un_suspend_jobs
15
- sleep 5
10
+ if Rails.application.config.active_job.queue_adapter.is_a? ActiveJob::QueueAdapters::K8sAdapter
11
+ puts "=> START ActiveJobK8s - ControlLoop sleep [5]"
12
+ Thread.new do
13
+ Rails.application.reloader.wrap do
14
+ loop do
15
+ Rails.application.config.active_job.queue_adapter.scheduler.un_suspend_jobs
16
+ sleep 5
17
+ end
16
18
  end
17
19
  end
20
+ else
21
+ puts "=> Queue Adapter was not ActiveJob::QueueAdapters::K8sAdapter"
18
22
  end
19
23
  end
20
24
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveJobK8s
2
- VERSION = "1.0.0-beta.1"
2
+ VERSION = "1.0.0-beta.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_job_k8s
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.1
4
+ version: 1.0.0.pre.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marino Bonetti
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-01 00:00:00.000000000 Z
11
+ date: 2023-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kubeclient
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  - !ruby/object:Gem::Version
111
111
  version: 1.3.1
112
112
  requirements: []
113
- rubygems_version: 3.1.4
113
+ rubygems_version: 3.2.33
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: ActiveJob adapter for kubernetes job