foreman-tasks 5.2.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/extra/foreman-tasks-cleanup.sh +19 -2
- data/lib/foreman_tasks/tasks/export_tasks.rake +1 -1
- data/lib/foreman_tasks/version.rb +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: affb6b8dabd35bf7600c2c76aa6f129dab3d43cbddc24120d89bbe898355adf2
|
4
|
+
data.tar.gz: 57e68fca3c4e837f5ccb5073c8c8459dbda2e98975c2211d4f583daa478ebbf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 117021731b7da694348b5b29564a3662b35a6de175b056db4ede99707ccace227f5815ace3adb9caee3e094aeba2fd9a0b722ad71c67c9405b8d2a97f33c16d1
|
7
|
+
data.tar.gz: 95a05ed5983f03aa8db0233d5f8c2dce7031eeae15f79ecb1fa936212920017da59d629a28908fde3469c3b7652c8ee4ae68f89b0aef4229152fad4f509283fc
|
@@ -21,6 +21,21 @@ function build_rake() {
|
|
21
21
|
echo
|
22
22
|
}
|
23
23
|
|
24
|
+
function incorrect_usage() {
|
25
|
+
echo "$1" >&2
|
26
|
+
echo
|
27
|
+
usage
|
28
|
+
|
29
|
+
exit 1
|
30
|
+
}
|
31
|
+
|
32
|
+
function validate_options!() {
|
33
|
+
if [ -z "$TASK_SEARCH" ]; then
|
34
|
+
[ -n "$AFTER" ] && incorrect_usage "Error: -a|--after cannot be used without -s|--search"
|
35
|
+
[ -n "$STATES" ] && incorrect_usage "Error: -S|--states cannot be used without -s|--search"
|
36
|
+
fi
|
37
|
+
}
|
38
|
+
|
24
39
|
function usage() {
|
25
40
|
cat << EOF
|
26
41
|
Usage: $PROGNAME [script_options...] [options...]
|
@@ -43,8 +58,8 @@ EOF
|
|
43
58
|
echo Cleanup options:
|
44
59
|
cat <<EOF | column -s\& -t
|
45
60
|
-B|--batch-size BATCH_SIZE & process tasks in batches of BATCH_SIZE, 1000 by default
|
46
|
-
-S|--states STATES & operate on tasks in STATES, comma separated list of states, set to all to operate on tasks in any state
|
47
|
-
-a|--after AGE & operate on tasks older than AGE. Expected format is a number followed by the time unit (s,h,m,y), such as '10d' for 10 days
|
61
|
+
-S|--states STATES & operate on tasks in STATES, comma separated list of states, set to all to operate on tasks in any state. Has to be used together with -s|--search
|
62
|
+
-a|--after AGE & operate on tasks older than AGE. Expected format is a number followed by the time unit (s,h,m,y), such as '10d' for 10 days. Has to be used together with -s|--search
|
48
63
|
-b|--backup & backup deleted tasks
|
49
64
|
-n|--noop & do a dry run, print what would be done
|
50
65
|
-s|--search QUERY & use QUERY in scoped search format to match tasks to delete
|
@@ -119,6 +134,8 @@ while true; do
|
|
119
134
|
shift
|
120
135
|
done
|
121
136
|
|
137
|
+
validate_options!
|
138
|
+
|
122
139
|
if [ "$EXECUTE" -eq 1 ]; then
|
123
140
|
build_rake | sh
|
124
141
|
else
|
@@ -300,7 +300,7 @@ namespace :foreman_tasks do
|
|
300
300
|
end
|
301
301
|
end
|
302
302
|
|
303
|
-
SKIP_ERRORS = ['true', '1', 'y', 'yes'].include? ENV['SKIP_FAILED'].downcase
|
303
|
+
SKIP_ERRORS = ['true', '1', 'y', 'yes'].include? (ENV['SKIP_FAILED'] || '').downcase
|
304
304
|
|
305
305
|
filter = if ENV['TASK_SEARCH'].nil? && ENV['TASK_DAYS'].nil?
|
306
306
|
"started_at > \"#{7.days.ago.to_s(:db)}\" || " \
|
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: 5.2.
|
4
|
+
version: 5.2.1
|
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:
|
11
|
+
date: 2022-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dynflow
|