Updates for the terminal

This commit is contained in:
Yağızhan authored and GitHub committed 2020-11-29 23:01:43 +03:00
1 parent 636c5f73ed
commit ea003a1e07
1 file changed
+7 -4
+7 -4
View File
@@ -10,7 +10,6 @@
* with this source code in the file LICENSE
*/
namespace Box\Mod\Cron;
class Service
@@ -86,8 +85,12 @@ class Service
{
try {
$api->{$method}($params);
} catch(\Exception $e) {
error_log($e);
} catch(Exception $e) {
throw new Exception($e);
} finally {
if (php_sapi_name() == 'cli') {
print ("\e[32mSuccessfully ran " . $method . "(" . $params . ")" . ".\e[0m\n");
}
}
}
@@ -107,4 +110,4 @@ class Service
$t2 = new \DateTime('-6min');
return ($t1 < $t2);
}
}
}