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

Annotation of /FortyEight/get_number_of_external_jobs.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (view) (download) (as text)

1 : wilke 1.1
2 :    
3 :     =head1 check_jobs.pl
4 :    
5 :     Check the status of the jobs in the 48-hour run queue to see if any
6 :     action should be taken.
7 :    
8 :     Actions taken are determined based on the metadata kept in meta.xml.
9 :    
10 :     We do a quick check by looking for the file ACTIVE in the job directory.
11 :     If this file does not exist, the job should not be considered.
12 :    
13 :     =cut
14 :    
15 :    
16 :     use strict;
17 :     use FIG;
18 :     use FIG_Config;
19 :     use GenomeMeta;
20 :     use Data::Dumper;
21 :     use Tracer;
22 :     use Job48;
23 :     use Mail::Mailer;
24 :    
25 :    
26 :     my @jobs = Job48::all_jobs();
27 :    
28 :     my $exclude = { batch => 1 ,
29 :     olson => 1 ,
30 :     mkubal => 1 ,
31 :     paczian => 1 ,
32 :     dbartels => 1 ,
33 :     tdisz => 1 ,
34 :     paarmann => 1 ,
35 :     mdsouza => 1 ,
36 :     mcohoon => 1 ,
37 :     arodriguez => 1 ,
38 :     fmeyer => 1 ,
39 : wilke 1.3 gdpusch => 1 ,
40 :     awilke => 1 ,
41 : wilke 1.1 };
42 :    
43 :     my %overview;
44 :    
45 :     for my $job (@jobs) {
46 :     my $jobuser = $job->getUserObject();
47 :     # print $jobuser->login."\t".$job->genome_name."\n";
48 :     if ( $overview{ $jobuser->login }->{ $job->genome_name } ){
49 :     my $nr = $overview{ $jobuser->login }->{ $job->genome_name };
50 :     $nr++;
51 :     $overview{ $jobuser->login }->{ $job->genome_name } = $nr;
52 :     }
53 :     else{
54 :     $overview{ $jobuser->login }->{ $job->genome_name } = 1;
55 :     }
56 :     }
57 :    
58 :    
59 : wilke 1.2 my $nr_excluded = 0;
60 : wilke 1.4 my $nr_external = 0;
61 : wilke 1.1 foreach my $user ( keys %overview ){
62 :     foreach my $genome ( keys %{ $overview{ $user } } ){
63 : wilke 1.2 if ( $exclude->{ $user } ){
64 :     $nr_excluded++;
65 :     }
66 :     else{
67 : wilke 1.1 print $user , "\t" , $genome ,"\t", $overview{ $user }->{ $genome }, "\n";
68 : wilke 1.4 $nr_external++;
69 : wilke 1.1 }
70 :     }
71 :     }
72 :    
73 : wilke 1.5 print "Jobs in current job directory = ". scalar @jobs ."\n";
74 : wilke 1.2 print "Excluded jobs = $nr_excluded\n";
75 : wilke 1.4 print "External jobs = $nr_external\n";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3