mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 21:41:03 +08:00
add command event:fire + fetch imdb when torrent created
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.9');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-02-22');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-02-23');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
@@ -1192,9 +1192,14 @@ function executeCommand($command, $format = 'string', $artisan = false, $excepti
|
||||
do_log("command: $command");
|
||||
$result = exec($command, $output, $result_code);
|
||||
$outputString = implode("\n", $output);
|
||||
do_log(sprintf('result_code: %s, result: %s, output: %s', $result_code, $result, $outputString));
|
||||
if ($exception && $result_code != 0) {
|
||||
throw new \RuntimeException($outputString);
|
||||
$log = sprintf('result_code: %s, result: %s, output: %s', $result_code, $result, $outputString);
|
||||
if ($result_code != 0) {
|
||||
do_log($log, "error");
|
||||
if ($exception) {
|
||||
throw new \RuntimeException($outputString);
|
||||
}
|
||||
} else {
|
||||
do_log($log);
|
||||
}
|
||||
return $format == 'string' ? $outputString : $output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user