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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b11e8e007c7d982a5554b027916d26df635d1d3824ba8a586b794370f1828f1a
4
- data.tar.gz: ac439b33efec89c1f939745de5470d8bcb12c9cc21dd8464527ecd400d9fe0a0
3
+ metadata.gz: 13d501dcd7ec95a0fc10ed4bd7b0a426e3f485aa3dd7ba597e56dbfd41268977
4
+ data.tar.gz: 6c392f1ad04344c887609894b64dac3bbd6add5c4a70cbf4ae1598c2851ac581
5
5
  SHA512:
6
- metadata.gz: 05a8f783d13985048ec24dd4d9fe8037cb1a5d8af0b266739fbbc515c9542f2b9c14de8e6e2b209194f84c8b5902300ff6f0b746814a063e0ab45521d8139035
7
- data.tar.gz: 632d536fa1056cc8fd69ee7375f7683da2675756151f890a3a6d1e42081225cbde5e71c8b3516e0804eabcda54ac61b340ae622f0f7cc63ebc0f4fc15026c809
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
- return if ForemanTasks::RecurringLogic.joins(:tasks)
10
- .merge(ForemanTasks::Task.where(label: task_class.name))
11
- .exists?
12
-
13
- User.as_anonymous_admin do
14
- recurring_logic = ForemanTasks::RecurringLogic.new_from_cronline(cronline)
15
- recurring_logic.save!
16
- recurring_logic.start(task_class)
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
- config.to_prepare do
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'),
@@ -1,3 +1,3 @@
1
1
  module ForemanRhCloud
2
- VERSION = '4.0.32'.freeze
2
+ VERSION = '4.0.35'.freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foreman_rh_cloud",
3
- "version": "4.0.32",
3
+ "version": "4.0.35",
4
4
  "description": "Inventory Upload =============",
5
5
  "main": "index.js",
6
6
  "scripts": {
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.32
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-03-10 00:00:00.000000000 Z
11
+ date: 2022-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: katello