foreman_rh_cloud 4.0.32 → 4.0.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foreman_rh_cloud/engine.rb +13 -11
- data/lib/foreman_rh_cloud/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13d501dcd7ec95a0fc10ed4bd7b0a426e3f485aa3dd7ba597e56dbfd41268977
|
4
|
+
data.tar.gz: 6c392f1ad04344c887609894b64dac3bbd6add5c4a70cbf4ae1598c2851ac581
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5bbe88508a4df1017b05d6dd13adb432040dbad271bc317abc10169decd43f1ab785dfc9733f3c8e4d5f6116ffa46252ace5996a5e133c2c48954da71679464
|
7
|
+
data.tar.gz: 448308053649ce5001aeb40b53f546a52c92a5a84c870d1bbda392655f579c0f16df61c53da16f58101708fdac855813c5f1adeb2039cf2c6a0f2ea1b4c6f709
|
@@ -6,15 +6,18 @@ module ForemanRhCloud
|
|
6
6
|
engine_name 'foreman_rh_cloud'
|
7
7
|
|
8
8
|
def self.register_scheduled_task(task_class, cronline)
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
9
|
+
ForemanTasks::RecurringLogic.transaction(isolation: :serializable) do
|
10
|
+
return if ForemanTasks::RecurringLogic.joins(:tasks)
|
11
|
+
.merge(ForemanTasks::Task.where(label: task_class.name))
|
12
|
+
.exists?
|
13
|
+
|
14
|
+
User.as_anonymous_admin do
|
15
|
+
recurring_logic = ForemanTasks::RecurringLogic.new_from_cronline(cronline)
|
16
|
+
recurring_logic.save!
|
17
|
+
recurring_logic.start(task_class)
|
18
|
+
end
|
17
19
|
end
|
20
|
+
rescue ActiveRecord::TransactionIsolationError
|
18
21
|
end
|
19
22
|
|
20
23
|
initializer 'foreman_rh_cloud.load_default_settings', :before => :load_config_initializers do
|
@@ -136,10 +139,9 @@ module ForemanRhCloud
|
|
136
139
|
Foreman::Gettext::Support.add_text_domain locale_domain, locale_dir
|
137
140
|
end
|
138
141
|
|
139
|
-
|
142
|
+
initializer 'foreman_rh_cloud.register_rex_features', :before => :finisher_hook do |_app|
|
140
143
|
# skip database manipulations while tables do not exist, like in migrations
|
141
|
-
if ActiveRecord::Base.connection.data_source_exists?(ForemanTasks::Task.table_name)
|
142
|
-
|
144
|
+
if ActiveRecord::Base.connection.data_source_exists?(ForemanTasks::Task.table_name)
|
143
145
|
RemoteExecutionFeature.register(
|
144
146
|
:rh_cloud_remediate_hosts,
|
145
147
|
N_('Apply Insights recommendations'),
|
data/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_rh_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Red Hat Cloud team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|