src/Comodojo/Extender/Tasks/AbstractTask.php 1 location
|
@@ 83-91 (lines=9) @@
|
| 80 |
|
|
| 81 |
|
// Setup an exit strategy if multithread enabled (parent may kill child process if timeout exceeded) |
| 82 |
|
|
| 83 |
|
pcntl_signal(SIGTERM, function() { |
| 84 |
|
|
| 85 |
|
$end = microtime(true); |
| 86 |
|
|
| 87 |
|
if ( !is_null($this->worklog_id) ) $this->worklog->close($this->worklog_id, false, 'Job killed (timeout exceeded?)', $end); |
| 88 |
|
|
| 89 |
|
exit(1); |
| 90 |
|
|
| 91 |
|
}); |
| 92 |
|
|
| 93 |
|
} |
| 94 |
|
|
src/Task/Task.php 1 location
|
@@ 172-180 (lines=9) @@
|
| 169 |
|
|
| 170 |
|
if ( filter_var($multithread, FILTER_VALIDATE_BOOLEAN) ) { |
| 171 |
|
|
| 172 |
|
pcntl_signal(SIGTERM, function() { |
| 173 |
|
|
| 174 |
|
$end = microtime(true); |
| 175 |
|
|
| 176 |
|
if ( !is_null($this->worklog_id) ) $this->closeWorklog($this->worklog_id, false, 'Job killed by parent (timeout exceeded)', $end); |
| 177 |
|
|
| 178 |
|
exit(1); |
| 179 |
|
|
| 180 |
|
}); |
| 181 |
|
|
| 182 |
|
} |
| 183 |
|
|