Guest User

Untitled

a guest
Jun 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. my $ok = 0;
  2.  
  3. llog($DEBUG, 'begin step=[' . ( defined $step ? $step : 'N/A' ) . ']');
  4.  
  5. if ( defined $step and $step eq 'CTL' ) {
  6.  
  7. hlog($INFO, 'begin CTL step');
  8.  
  9. my $MAX_PROCESS_TO_USE;
  10. my $queries_to_execute = [];
  11. my @team = ();
  12.  
  13. $SIG{CHLD} = &zombies_killer;
  14.  
  15. $DICTIONARY->{LIST_REQUETE} = $CONFIG->{ExportFiles}->{QUERIES_LIST};
  16. $DICTIONARY->{separator_req} = $CONFIG->{CTLQueriesSeparators}->{separator_req};
  17. $DICTIONARY->{separator_ctl} = $CONFIG->{CTLQueriesSeparators}->{separator_ctl};
  18. $DICTIONARY->{ALL_QUERY_CTRL} = $CONFIG->{ExportFiles}->{QUERY_CTRL_GET};
  19.  
  20. my $sr;
  21. my $msgs;
  22.  
  23. if ( can_we_proceed_now( $CONFIG ) ) {
  24.  
  25. ( $ok, $sr, $msgs ) = ExecScripts(
  26. Scripts => [ $CONFIG->{BTEQScripts}->{query_control} ],
  27. Messages => [ 'FILE=Get control queries listEXEC=', ],
  28. Files => [ $CONFIG->{ExportFiles}->{QUERIES_LIST} ],
  29. NoExec => [1],
  30. );
  31.  
  32. llog($DEBUG, "CTL1 ok=[$ok] SR=[" . Dumper( $sr ) . '] msg=[' . Dumper( $msgs ) . ']');
  33.  
  34. if ( ! $ok ) {
  35. llog($INFO, 'an error occured previously, abort');
  36. return CTL_FAIL_GET_CTRL_QUERIES;
  37. }
  38.  
  39. if ( ! -z $CONFIG->{ExportFiles}->{QUERIES_LIST} ) {
  40. $ok = ctl_clean_exported_file(
  41. INPUT_FILE => $CONFIG->{ExportFiles}->{QUERIES_LIST},
  42. OUTPUT_FILE => $CONFIG->{ExportFiles}->{QUERIES_LIST} . '.tmp',
  43. );
Add Comment
Please, Sign In to add comment