Move server names to the one place (pch.pm).
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 13 Jun 2007 16:14:02 +0000 (16:14 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Wed, 13 Jun 2007 16:14:02 +0000 (16:14 +0000)
Added some arguments.

org.glite.jp.index/examples/pch06/pch.pm
org.glite.jp.index/examples/pch06/query1.pl
org.glite.jp.index/examples/pch06/query2.pl
org.glite.jp.index/examples/pch06/query3.pl
org.glite.jp.index/examples/pch06/query4.pl
org.glite.jp.index/examples/pch06/query5.pl
org.glite.jp.index/examples/pch06/query6.pl

index cfd17aa..6f33f17 100644 (file)
@@ -12,6 +12,9 @@ use warnings;
 use XML::Twig;
 use Data::Dumper;
 
+our $ps='https://skurut1,cesnet.cz:8901';
+our $is='https://scientific.civ.zcu.cz:8904';
+
 our $lbattr='http://egee.cesnet.cz/en/Schema/LB/Attributes';
 our $jpsys='http://egee.cesnet.cz/en/Schema/JP/System';
 our $jpwf='http://egee.cesnet.cz/en/Schema/JP/Workflow';
index 9b155b1..03cce44 100644 (file)
@@ -15,8 +15,8 @@ use strict;
 use pch;
 use Data::Dumper;
 
-my $ps='https://skurut1.cesnet.cz:8901';
-my $is='https://skurut1.cesnet.cz:8902';
+my $ps=$pch::ps;
+my $is=$pch::is;
 
 my @according_jobs = (); # sequencially jobid list
 my %according_jobs = (); # hash jobid list
index e189b59..c6d8527 100644 (file)
@@ -14,8 +14,8 @@ use strict;
 use pch;
 use Data::Dumper;
 
-my $ps='https://skurut1.cesnet.cz:8901';
-my $is='https://skurut1.cesnet.cz:8902';
+my $ps=$pch:ps;
+my $is=$pch:is;
 my $program_name = "softmean";
 
 my @according_jobs = (); # sequencially jobid list
@@ -24,11 +24,12 @@ my $according_count = 0;
 my $output;
 
 
-if ($#ARGV + 1 != 1) {
-       print STDERR "Usage: $0 OUTPUT_FILE\n";
+if ($#ARGV + 1 < 1) {
+       print STDERR "Usage: $0 OUTPUT_FILE [PROGRAM]\n";
        exit 1
 }
 $output = $ARGV[0];
+if ($#ARGV + 1 > 1) { $program_name = $ARGV[1]; }
 
 # debug calls
 $pch::debug = 0;
index 7182679..9cb5b4a 100644 (file)
@@ -13,8 +13,8 @@ use strict;
 use pch;
 use Data::Dumper;
 
-my $ps='https://skurut1.cesnet.cz:8901';
-my $is='https://skurut1.cesnet.cz:8902';
+my $ps=$pch::ps;
+my $is=$pch::is;
 my @attributes = ("$pch::jpsys:jobId", "$pch::jpwf:ancestor", @pch::view_attributes);
 
 my @according_jobs = (); # sequencially jobid list
@@ -95,7 +95,8 @@ foreach my $jobid (sort { $according_jobs{$b}{attributes}{"$pch::jplbtag:IPAW_ST
        my %attributes = %{$job{attributes}};
        my $stage = $attributes{"$pch::jplbtag:IPAW_STAGE"}{value}[0];
 
-       if ( $stage == 3 || $stage == 4 || $stage == 5) {
+#      if ( $stage == 3 || $stage == 4 || $stage == 5) {
+       if ( $stage == 2 || $stage == 3) {
                print "jobid $jobid:\n";
 
                # query & output all desired atributes
index 467c2fd..82d9759 100644 (file)
@@ -15,8 +15,8 @@ use strict;
 use pch;
 use Data::Dumper;
 
-my $ps='https://skurut1.cesnet.cz:8901';
-my $is='https://skurut1.cesnet.cz:8902';
+my $ps=$pch::ps;
+my $is=$pch::is;
 my $program_name='align_warp';
 my $program_params='-m 12';
 my $runday=1;
@@ -31,6 +31,8 @@ my $according_count = 0;
 $pch::debug = 0;
 my $debug = 0;
 
+if ($#ARGV + 1 > 1) { $program_name=$ARGV[0]; }
+
 #
 # find out processes with given name ant parameters
 #
index c9f05b7..3f700a5 100644 (file)
@@ -15,8 +15,8 @@ use strict;
 use pch;
 use Data::Dumper;
 
-my $ps='https://skurut1.cesnet.cz:8901';
-my $is='https://skurut1.cesnet.cz:8902';
+my $ps=$pch::ps;
+my $is=$pch::is;
 my $program_name='align_warp';
 my $end_program_name='convert';
 my $header="GLOBAL_MAXIMUM=4095"; # test for exact equal (scripts already prepared it)
@@ -30,6 +30,9 @@ my $according_count = 0;
 $pch::debug = 0;
 my $debug = 0;
 
+if ($#ARGV + 1 >= 1) { $program_name = $ARGV[0]; }
+if ($#ARGV + 1 >= 2) { $end_program_name = $ARGV[1]; }
+
 #
 # find out processes with given name and parameters
 #
index 21521e8..8c1d851 100644 (file)
@@ -17,8 +17,8 @@ use strict;
 use pch;
 use Data::Dumper;
 
-my $ps='https://skurut1.cesnet.cz:8901';
-my $is='https://skurut1.cesnet.cz:8902';
+my $ps=$pch::ps;
+my $is=$pch::is;
 my $program_name='align_warp';
 my $program_param='-m 12';
 my $end_program_name='softmean';
@@ -35,6 +35,9 @@ my $workflow_count = 0;
 $pch::debug = 0;
 my $debug = 0;
 
+if ($#ARGV + 1 >= 1) { $program_name = $ARGV[0]; }
+if ($#ARGV + 1 >= 2) { $end_program_name = $ARGV[1]; }
+
 #
 # find out processes with given name and parameters
 #