line |
true |
false |
branch |
27
|
0 |
0 |
unless defined $debug
|
28
|
0 |
0 |
unless $args{'state_dir'}
|
44
|
0 |
0 |
unless my $state_dir = $self->{'state_dir'}
|
45
|
0 |
0 |
unless -e $state_dir
|
46
|
0 |
0 |
unless -r "$state_dir/$filename"
|
50
|
0 |
0 |
unless -w $state_dir
|
52
|
0 |
0 |
unless -d $state_dir
|
55
|
0 |
0 |
unless open my $fh, '<', $file_path
|
59
|
0 |
0 |
unless close $fh
|
60
|
0 |
0 |
if (looks_like_sereal($f)) { }
|
61
|
0 |
0 |
unless $ret = decode_sereal($f)
|
63
|
0 |
0 |
unless $ret = do $file_path
|
66
|
0 |
0 |
if $@
|
77
|
0 |
0 |
unless -e $self->{'state_dir'}
|
78
|
0 |
0 |
unless open my $fh, '>', "$self->{'state_dir'}/$filename.tmp"
|
81
|
0 |
0 |
unless print $fh encode_sereal($contents)
|
82
|
0 |
0 |
unless close $fh
|
83
|
0 |
0 |
unless rename "$self->{'state_dir'}/$filename.tmp", "$self->{'state_dir'}/$filename"
|
85
|
0 |
0 |
if $@
|
90
|
0 |
0 |
unless open my $fh, '<', $path
|
91
|
0 |
0 |
unless read $fh, my $ret, 1024000
|
93
|
0 |
0 |
unless close $fh
|
123
|
0 |
0 |
unless $status = $self->_read_file($task_name . '.status')
|
126
|
0 |
0 |
if ($@)
|
136
|
0 |
0 |
unless $status_cmdline = $status->{'cmdline'}
|
138
|
0 |
0 |
unless my $status_save_ts = $status->{'save_ts'}
|
140
|
0 |
0 |
if ($@)
|
141
|
0 |
0 |
if $@
|
151
|
0 |
0 |
if ($status_pid)
|
155
|
0 |
0 |
if $status_cmdline ne $status_pid_cmdline
|
158
|
0 |
0 |
if $status_pid == $$
|
162
|
0 |
0 |
if (-d "/proc/$status_pid/fd/")
|
164
|
0 |
0 |
unless opendir my $dh, "/proc/$status_pid/fd/"
|
165
|
0 |
0 |
unless my(@files) = grep({not /^\./;} readdir $dh)
|
170
|
0 |
0 |
if (-d "/proc/$status_pid/task/")
|
172
|
0 |
0 |
unless opendir my $dh, "/proc/$status_pid/task/"
|
173
|
0 |
0 |
unless my(@files) = grep({not /^\./;} readdir $dh)
|
179
|
0 |
0 |
if ($@)
|
205
|
0 |
0 |
unless ($time_slice)
|
209
|
0 |
0 |
unless $time_slice->{$task_name}
|
210
|
0 |
0 |
if ($cache->{$task_name} and $time_slice->{$task_name} == time)
|
221
|
0 |
0 |
if $@
|
249
|
0 |
0 |
unless $state = $self->_read_file($task_name . '.state')
|
252
|
0 |
0 |
if ($@)
|
274
|
0 |
0 |
unless my $state_dir = $self->{'state_dir'}
|
276
|
0 |
0 |
unless -e $file
|
277
|
0 |
0 |
unless unlink $file
|
292
|
0 |
0 |
unless my $state_dir = $self->{'state_dir'}
|
297
|
0 |
0 |
unless open my $fh, '>', $file
|
299
|
0 |
0 |
unless print $fh Data::Dumper::Dumper($message)
|
301
|
0 |
0 |
unless close $fh
|
305
|
0 |
0 |
if $@
|
318
|
0 |
0 |
unless my $state_dir = $self->{'state_dir'}
|
319
|
0 |
0 |
if -e "$state_dir/$task_name.failsafe"
|
332
|
0 |
0 |
unless $status
|
333
|
0 |
0 |
if ($args{'no_save_pid'}) { }
|
346
|
0 |
0 |
if $@
|
358
|
0 |
0 |
unless $state->{'.multimodule'}
|
383
|
0 |
0 |
unless my $state_dir = $self->{'state_dir'}
|
387
|
0 |
0 |
unless opendir my $dh, $state_dir
|
389
|
0 |
0 |
if not /^\./ and -f "$state_dir/$_"
|
394
|
0 |
0 |
unless closedir $dh
|
412
|
0 |
0 |
if $@
|
426
|
0 |
0 |
unless my $status = $self->get_task_status($task_name)
|
427
|
0 |
0 |
unless $pid = $status->{'pid'}
|
428
|
0 |
0 |
if $pid == $$
|
430
|
0 |
0 |
if $@
|
431
|
0 |
0 |
if $@
|
432
|
0 |
0 |
unless $pid
|