foreman-tasks 10.0.0 → 10.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/foreman_tasks/cleaner.rb +1 -1
- data/lib/foreman_tasks/tasks/export_tasks.rake +3 -3
- data/lib/foreman_tasks/version.rb +1 -1
- data/lib/foreman_tasks.rb +1 -1
- data/lib/tasks/gettext.rake +15 -9
- metadata +3 -4
- data/locale/action_names.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34be658746dd0f136ff054fa6b9f381b9d2ee3758715219f4709f8b745ea1807
|
4
|
+
data.tar.gz: e4240056a3707edfccf95f90ed86c970f6e76d8eb5f7c1273987786a2dc97fb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0a7729b58e671ce34f57adf83c052ca9af2e8e670e3302fa0d1dbee1ec82975f327a8a90fde202b2c68953dbdbdc1fd429330232911b002d2fdca77bf157bad
|
7
|
+
data.tar.gz: 2094c271990a108d4e804bf42f3e5b7464427674a4d46d26b130883ad057069141d2303286a0ee7fec7afbcc01bebd48d4d6c4955a64544107d2a2797cd558ad
|
data/.gitignore
CHANGED
@@ -252,7 +252,7 @@ module ForemanTasks
|
|
252
252
|
|
253
253
|
def prepare_filter
|
254
254
|
filter_parts = [filter]
|
255
|
-
filter_parts << %(started_at < "#{after.ago.
|
255
|
+
filter_parts << %(started_at < "#{after.ago.to_formatted_s(:db)}") if after > 0
|
256
256
|
filter_parts << "state ^ (#{states.join(',')})" if states.any?
|
257
257
|
filter_parts.select(&:present?).map { |segment| "(#{segment})" }.join(' AND ')
|
258
258
|
end
|
@@ -310,15 +310,15 @@ namespace :foreman_tasks do
|
|
310
310
|
SKIP_ERRORS = ['true', '1', 'y', 'yes'].include? (ENV['SKIP_FAILED'] || '').downcase
|
311
311
|
|
312
312
|
filter = if ENV['TASK_SEARCH'].nil? && ENV['TASK_DAYS'].nil?
|
313
|
-
"started_at > \"#{7.days.ago.
|
314
|
-
"(result != success && started_at > \"#{60.days.ago.
|
313
|
+
"started_at > \"#{7.days.ago.to_formatted_s(:db)}\" || " \
|
314
|
+
"(result != success && started_at > \"#{60.days.ago.to_formatted_s(:db)})\""
|
315
315
|
else
|
316
316
|
ENV['TASK_SEARCH'] || ''
|
317
317
|
end
|
318
318
|
|
319
319
|
if (days = ENV['TASK_DAYS'])
|
320
320
|
filter += ' && ' unless filter == ''
|
321
|
-
filter += "started_at > \"#{days.to_i.days.ago.
|
321
|
+
filter += "started_at > \"#{days.to_i.days.ago.to_formatted_s(:db)}\""
|
322
322
|
end
|
323
323
|
|
324
324
|
format = ENV['TASK_FORMAT'] || 'html'
|
data/lib/foreman_tasks.rb
CHANGED
@@ -33,7 +33,7 @@ module ForemanTasks
|
|
33
33
|
finished.wait(timeout)
|
34
34
|
task = ForemanTasks::Task::DynflowTask.where(:external_id => id).first
|
35
35
|
if task.nil? || (!task.paused? && task.pending?)
|
36
|
-
raise
|
36
|
+
raise Timeout::Error, "The time waiting for task #{task.try(:id)} to finish exceeded the 'foreman_tasks_sync_task_timeout' (#{timeout}s)"
|
37
37
|
end
|
38
38
|
end
|
39
39
|
task || ForemanTasks::Task::DynflowTask.where(:external_id => id).first!
|
data/lib/tasks/gettext.rake
CHANGED
@@ -8,21 +8,27 @@ if gettext_find_task
|
|
8
8
|
namespace :gettext do
|
9
9
|
task :store_action_names => :environment do
|
10
10
|
storage_file = "#{locale_path}/action_names.rb"
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
method_names = [:plan, :run, :finalize]
|
12
|
+
instances = Actions::EntryAction
|
13
|
+
.descendants
|
14
|
+
.uniq
|
15
|
+
.map(&:allocate)
|
16
|
+
.select do |action|
|
17
|
+
method_names.any? do |method_name|
|
18
|
+
if action.respond_to?(method_name)
|
19
|
+
src, = action.method(method_name).source_location
|
20
|
+
src.start_with? @engine.root.to_s
|
21
|
+
end
|
22
|
+
end
|
17
23
|
end
|
18
24
|
|
19
|
-
if
|
25
|
+
if instances.any?
|
20
26
|
puts "writing action translations to: #{storage_file}"
|
21
27
|
|
22
28
|
File.write storage_file,
|
23
29
|
"# Autogenerated!\n" +
|
24
|
-
|
25
|
-
.map { |
|
30
|
+
instances
|
31
|
+
.map { |instance| %[_("#{instance.humanized_name}")] }
|
26
32
|
.sort
|
27
33
|
.join("\n") + "\n"
|
28
34
|
elsif File.exist? storage_file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.0.
|
4
|
+
version: 10.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dynflow
|
@@ -318,7 +318,6 @@ files:
|
|
318
318
|
- lib/foreman_tasks/version.rb
|
319
319
|
- lib/tasks/gettext.rake
|
320
320
|
- locale/Makefile
|
321
|
-
- locale/action_names.rb
|
322
321
|
- locale/de/LC_MESSAGES/foreman_tasks.mo
|
323
322
|
- locale/de/foreman_tasks.po
|
324
323
|
- locale/en/LC_MESSAGES/foreman_tasks.mo
|
@@ -642,7 +641,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
642
641
|
- !ruby/object:Gem::Version
|
643
642
|
version: '0'
|
644
643
|
requirements: []
|
645
|
-
rubygems_version: 3.3.
|
644
|
+
rubygems_version: 3.3.27
|
646
645
|
signing_key:
|
647
646
|
specification_version: 4
|
648
647
|
summary: Foreman plugin for showing tasks information for resources and users
|