foreman-tasks 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzVkNDM3MzdlYjM0YmI2NTE5ZjE3YTY4MmYyNWQ2NDMyYmFlYzgxMA==
4
+ NDU0Mzk4MWU2NDIzMmY3ZDVhMTEyZDdhN2RiNDcyNGVjZGVjMGQ1Mg==
5
5
  data.tar.gz: !binary |-
6
- MGFiYzQ3MGQyMWFlMTkyNjBjMDYzZGFkNDA3YTdkNTAyZGI1Yzg5MQ==
6
+ MTcyNGQ0ZDdhN2JkZWY0NzNiM2Q1MzBkNWUzZDU5Y2I0MjMxNjliZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODk5NDBhNDQ5MDI5YjI0ODQ4NDkyNDUwYTYxY2FjODM0ZTZjNzk5N2Y2YmI3
10
- MDhjNWM1MDEyOTg4ZmE5NjIyNGNjYjJhZjUwMjRmMTQ1OGZiNjA5MWNiODQw
11
- YTNlOTgwZjM5ZTE4MWQ2OTg3YTc0MzZhMDdiMGE5YjIwN2I1Mjk=
9
+ Yjg3Yjk4OTJlMmY5MDk0OWUyZWI0MDRmOTIyYjFmMDY2NDE2ZjU0YTNmODgz
10
+ ODI1YWY1NTBjNDk3NTgwOWFmZjgyZDhiMzcxNzVlNDg1ZTM3ODNjZjNhOWEw
11
+ NDcxZWY4MDEyNTJkZDk0M2RkNDQ0YTNlOWMxZDNkOTIzZDdkN2M=
12
12
  data.tar.gz: !binary |-
13
- ZmNmZmM4OGIyNDI0OWY0NGYxYmY4YTQxZmM0NDkyNmFmNmVmYjkwZDdhOWYy
14
- MGU1ZDI5MzI1ZmQxNzBkOWNiMWQwNGYzNjk0YTI4YmYzZGI1NTcyZGEwMzgw
15
- ZDM3MDFlNzM2YmZkOGQwMGMzMDE3MjI4NzczYzVhNzIyMTQ5OGE=
13
+ OGQzOWFmNTgyZjJlMTIyNDRiNmY4Nzk4OTdlYTEyZmMzNmFlMmY4MzE3YmM5
14
+ M2YxMmVlOWRiMDZiODI1ZjZiMWQ4ZDhkMDMzNDIwZGY1MGY4NzEyODRhNmFj
15
+ ZTNhOWZiY2YwYjE2MDFlMTE2YjBjNjhkYTY3NjYxYTE0MmRjZjQ=
@@ -7,6 +7,8 @@ module ForemanTasks
7
7
  class Dynflow::Persistence < ::Dynflow::PersistenceAdapters::Sequel
8
8
 
9
9
  def save_execution_plan(execution_plan_id, value)
10
+ # clear connection only if not running in some active record transaction already
11
+ clear_connections = ActiveRecord::Base.connection.open_transactions == 0
10
12
  super.tap do
11
13
  begin
12
14
  on_execution_plan_save(execution_plan_id, value)
@@ -17,7 +19,7 @@ module ForemanTasks
17
19
  end
18
20
  end
19
21
  ensure
20
- ::ActiveRecord::Base.clear_active_connections!
22
+ ::ActiveRecord::Base.clear_active_connections! if clear_connections
21
23
  end
22
24
 
23
25
  def on_execution_plan_save(execution_plan_id, data)
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas