Disable sync time limit in console

This commit is contained in:
An Phan 2016-01-15 09:53:31 +08:00
parent eb9e9a2317
commit 946f335cc2

View file

@ -34,7 +34,9 @@ class Media
*/
public function sync($path = null, SyncMedia $syncCommand = null)
{
set_time_limit(env('APP_MAX_SCAN_TIME', 600));
if (!app()->runningInConsole()) {
set_time_limit(env('APP_MAX_SCAN_TIME', 600));
}
$path = $path ?: Setting::get('media_path');