Slackbot
09/12/2023, 2:56 PMWillem Basson
09/12/2023, 2:57 PMYury Bushmelev
09/12/2023, 3:05 PMYury Bushmelev
09/12/2023, 3:06 PMparallel
+ background
+ wait
Yury Bushmelev
09/12/2023, 3:06 PMrun_task($targets)
, then continue with ok_setYury Bushmelev
09/12/2023, 3:08 PMparallel
Yury Bushmelev
09/12/2023, 3:08 PMmcdonaldseanp
09/12/2023, 3:11 PMResultSet
with all the targets you can use .error_set
and .ok_set
to filter out the ones that failed vs. succeeded respectivelyWillem Basson
09/12/2023, 3:12 PMYury Bushmelev
09/12/2023, 3:13 PMYury Bushmelev
09/12/2023, 3:13 PMWillem Basson
09/12/2023, 3:13 PMYury Bushmelev
09/12/2023, 3:13 PMparallelize
and background
are GA nowmcdonaldseanp
09/12/2023, 3:14 PMYury Bushmelev
09/12/2023, 3:14 PMparallelize($targets)
then you’ll be unlocked on rebootWillem Basson
09/12/2023, 3:14 PMYury Bushmelev
09/12/2023, 3:15 PMWillem Basson
09/13/2023, 7:52 PMparallelize(get_targets($correct_version_targets)) |$target| {
$log_check_results = run_task('projectname::somecomplextask', $target, _catch_errors => true)
$log_check_results.each |$result| {
$t = $result.target.name
if $result.ok {
run_task('xneelo_pixar::update_status', localhost, {
server => $t,
position => '99',
message => 'done',
database_password => $database_password
})
} else {
run_task('xneelo_pixar::update_status', localhost, {
server => $t,
position => '90',
message => 'post_checks_failed',
database_password => $database_password
})
}
}
the idea being that each host will try to do the complex task, then run the dashboard updator as soon as it is done (no matter if successful).
Am I right in saying that we could probably get the same result by creating what the earlier example called a subplan, and in that, have 3 tasks.
1. do complex task
2. filter the results of the complex task and run a dashboard updator task on each filter result
3. profit?Yury Bushmelev
09/14/2023, 1:55 AMYury Bushmelev
09/14/2023, 1:57 AMWillem Basson
09/14/2023, 12:14 PMWillem Basson
09/14/2023, 12:14 PM