[Bio] / FortyEight / get_number_of_external_jobs.pl Repository:
ViewVC logotype

View of /FortyEight/get_number_of_external_jobs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Mon Nov 5 20:23:46 2007 UTC (12 years, 8 months ago) by wilke
Branch: MAIN
Changes since 1.1: +6 -2 lines
*** empty log message ***


=head1 check_jobs.pl

Check the status of the jobs in the 48-hour run queue to see if any 
action should be taken.

Actions taken are determined based on the metadata kept in meta.xml.

We do a quick check by looking for the file ACTIVE in the job directory.
If this file does not exist, the job should not be considered.

=cut

    
use strict;
use FIG;
use FIG_Config;
use GenomeMeta;
use Data::Dumper;
use Tracer;
use Job48;
use Mail::Mailer;


my @jobs = Job48::all_jobs();

my $exclude = { batch => 1 ,
		olson => 1 ,
		mkubal => 1 ,
		paczian => 1 ,
		dbartels => 1 ,
		tdisz => 1 ,
		paarmann => 1 ,
		mdsouza => 1 ,
		mcohoon => 1 ,
		arodriguez => 1 ,
		fmeyer => 1 , 
		gdpusch => 1,
	      };

my %overview;

for my $job (@jobs)  {
  my $jobuser = $job->getUserObject();
  # print $jobuser->login."\t".$job->genome_name."\n";
  if ( $overview{ $jobuser->login }->{ $job->genome_name } ){ 
    my $nr = $overview{ $jobuser->login }->{ $job->genome_name };
    $nr++;
    $overview{ $jobuser->login }->{ $job->genome_name } = $nr;
  }
  else{
    $overview{ $jobuser->login }->{ $job->genome_name } = 1;
  }
}
  

my $nr_excluded = 0;
foreach my $user ( keys %overview ){
  foreach my $genome ( keys %{ $overview{ $user } } ){
    if ( $exclude->{ $user } ){
      $nr_excluded++;
    }
    else{
      print $user , "\t" , $genome ,"\t", $overview{ $user }->{ $genome }, "\n";
    }
  }
}

print "Excluded jobs = $nr_excluded\n";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3