Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $ok = 0;
- llog($DEBUG, 'begin step=[' . ( defined $step ? $step : 'N/A' ) . ']');
- if ( defined $step and $step eq 'CTL' ) {
- hlog($INFO, 'begin CTL step');
- my $MAX_PROCESS_TO_USE;
- my $queries_to_execute = [];
- my @team = ();
- $SIG{CHLD} = &zombies_killer;
- $DICTIONARY->{LIST_REQUETE} = $CONFIG->{ExportFiles}->{QUERIES_LIST};
- $DICTIONARY->{separator_req} = $CONFIG->{CTLQueriesSeparators}->{separator_req};
- $DICTIONARY->{separator_ctl} = $CONFIG->{CTLQueriesSeparators}->{separator_ctl};
- $DICTIONARY->{ALL_QUERY_CTRL} = $CONFIG->{ExportFiles}->{QUERY_CTRL_GET};
- my $sr;
- my $msgs;
- if ( can_we_proceed_now( $CONFIG ) ) {
- ( $ok, $sr, $msgs ) = ExecScripts(
- Scripts => [ $CONFIG->{BTEQScripts}->{query_control} ],
- Messages => [ 'FILE=Get control queries listEXEC=', ],
- Files => [ $CONFIG->{ExportFiles}->{QUERIES_LIST} ],
- NoExec => [1],
- );
- llog($DEBUG, "CTL1 ok=[$ok] SR=[" . Dumper( $sr ) . '] msg=[' . Dumper( $msgs ) . ']');
- if ( ! $ok ) {
- llog($INFO, 'an error occured previously, abort');
- return CTL_FAIL_GET_CTRL_QUERIES;
- }
- if ( ! -z $CONFIG->{ExportFiles}->{QUERIES_LIST} ) {
- $ok = ctl_clean_exported_file(
- INPUT_FILE => $CONFIG->{ExportFiles}->{QUERIES_LIST},
- OUTPUT_FILE => $CONFIG->{ExportFiles}->{QUERIES_LIST} . '.tmp',
- );
Add Comment
Please, Sign In to add comment