<?php
namespace App\Cron\Job\Utils;

/**
 * Log running cronjob
 *  - should update the DB at 10s
 *  - might allow parallel running (default is still disabled)
 *  - maxLoad is loaded from \App\Config\ServerLoadLimits
 * @author Lucian Sirbu
 */
abstract class LongRunningCronJobAbstract extends GeneralAbstract
{
	public function __construct()
	{
		parent::__construct();

		$this->options['dbUpdateInterval'] = 		10.0;
		$this->options['allowMultipleInstances'] = 	false;
		$this->options['cronPriority'] = 			'low';
		$this->options['maxLoad'] = 				(Float)\App\Config\ServerLoadLimits::getInstance()->get('idle');
	}
}
