line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Email::Blaster::StandAlone; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
864
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
50
|
|
5
|
2
|
|
|
2
|
|
8
|
use warnings 'all'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
64
|
|
6
|
2
|
|
|
2
|
|
16
|
use base 'Email::Blaster'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
698
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#============================================================================== |
10
|
|
|
|
|
|
|
sub find_new_transmission |
11
|
|
|
|
|
|
|
{ |
12
|
|
|
|
|
|
|
my ($s) = @_; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $sth = Email::Blaster::Transmission->db_Main->prepare(<<"SQL"); |
15
|
|
|
|
|
|
|
SELECT * |
16
|
|
|
|
|
|
|
FROM transmissions |
17
|
|
|
|
|
|
|
WHERE is_queued = 1 |
18
|
|
|
|
|
|
|
AND ( |
19
|
|
|
|
|
|
|
is_started = 0 |
20
|
|
|
|
|
|
|
) |
21
|
|
|
|
|
|
|
OR ( |
22
|
|
|
|
|
|
|
is_started = 1 |
23
|
|
|
|
|
|
|
AND is_completed = 0 |
24
|
|
|
|
|
|
|
) |
25
|
|
|
|
|
|
|
ORDER BY queued_on DESC |
26
|
|
|
|
|
|
|
LIMIT 0, 1 |
27
|
|
|
|
|
|
|
SQL |
28
|
|
|
|
|
|
|
$sth->execute(); |
29
|
|
|
|
|
|
|
return unless my ($trans) = Email::Blaster::Transmission->sth_to_objects( $sth ); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return $trans; |
32
|
|
|
|
|
|
|
}# end find_new_transmission() |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1;# return true: |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |