[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.1 - (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 :     gdpusch => 1,
40 :     };
41 :    
42 :     my %overview;
43 :    
44 :     for my $job (@jobs) {
45 :     my $jobuser = $job->getUserObject();
46 :     # print $jobuser->login."\t".$job->genome_name."\n";
47 :     if ( $overview{ $jobuser->login }->{ $job->genome_name } ){
48 :     my $nr = $overview{ $jobuser->login }->{ $job->genome_name };
49 :     $nr++;
50 :     $overview{ $jobuser->login }->{ $job->genome_name } = $nr;
51 :     }
52 :     else{
53 :     $overview{ $jobuser->login }->{ $job->genome_name } = 1;
54 :     }
55 :     }
56 :    
57 :    
58 :     foreach my $user ( keys %overview ){
59 :     foreach my $genome ( keys %{ $overview{ $user } } ){
60 :     unless ( $exclude->{ $user } ){
61 :     print $user , "\t" , $genome ,"\t", $overview{ $user }->{ $genome }, "\n";
62 :     }
63 :     }
64 :     }
65 :    
66 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3