Changeset 30586 for branches/czw_branch/20101203/tools/czartool/Pantasks.pm
- Timestamp:
- Feb 11, 2011, 4:29:48 PM (15 years ago)
- Location:
- branches/czw_branch/20101203
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tools/czartool/Pantasks.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20101203
- Property svn:mergeinfo changed
-
branches/czw_branch/20101203/tools/czartool/Pantasks.pm
r29076 r30586 120 120 chomp($line); 121 121 if (!$self->outputOk($line)) {return \@labels;} 122 if ($line =~ m/pantasks:\s+/) {$passedHeader=1; next;} 123 if ($passedHeader) {push(@labels, $line);} 122 123 # sometimes a label can be on the same line as the panstasks prompt 124 if ($line =~ m/pantasks: (.*)/) { 125 $line = $1; 126 $passedHeader=1; 127 } 128 129 if ($passedHeader && length($line) > 0){push(@labels, $line);} 124 130 } 125 131 … … 191 197 } 192 198 } 199 200 ########################################################################### 201 # 202 # Gets current dates for this server 203 # 204 ########################################################################### 205 sub getDates { 206 my ($self, $server) = @_; 207 208 my @dates; 209 210 my $prefix; 211 212 if ($server eq "stdscience") {$prefix = "ns";} 213 elsif ($server eq "registration") {$prefix = "register";} 214 215 my @cmdOut = `echo "$prefix.show.dates;quit" | pantasks_client -c ~ipp/$server/ptolemy.rc 2>&1`; 216 my $line; 217 my $passedHeader=0; 218 foreach $line (@cmdOut) { 219 220 chomp($line); 221 if (!$self->outputOk($line)) {return \@dates;} 222 223 # sometimes content is on same line as pantasks prompt 224 if ($line =~ m/pantasks: (.*)/) { 225 $line =~ s/pantasks: //; 226 $passedHeader=1; 227 } 228 229 if ($passedHeader && length($line) > 0){ 230 231 # strip out only the date part 232 if ($line =~ m/([0-9]{4}-[0-9]{2}-[0-9]{2}).*/) { 233 234 push(@dates, $1); 235 } 236 } 237 } 238 239 return \@dates; 240 } 241 242 193 243 1;
Note:
See TracChangeset
for help on using the changeset viewer.
