line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Schedule::SGE::Control |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# POD docs |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 Schedule::SGE::Control |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Control jobs on the SGE queues. You should not use this method directly, rather you should use the SGE method that inherits from this, then all the methods herein are available to you. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 AUTHOR |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Rob Edwards (rob@salmonella.org) |
12
|
|
|
|
|
|
|
3/24/05 |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=cut |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
package SGE::Control; |
17
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
49
|
|
18
|
1
|
|
|
1
|
|
4
|
use Exporter; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
4
|
use vars qw(@ISA @EXPORT_OK); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
122
|
|
21
|
|
|
|
|
|
|
@ISA = qw(Schedule::SGE Exporter); |
22
|
|
|
|
|
|
|
@EXPORT_OK = qw(qdel); |
23
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head2 qdel() |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Delete all failed jobs from a queue (this must be run as the user who owns the jobs) |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub qdel { |
32
|
0
|
|
|
0
|
|
|
my ($self, $user)=@_; |
33
|
0
|
0
|
|
|
|
|
unless ($user) {$user =`whoami`; chomp($user)} |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
print `qdel -u $user`; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |