<commit_before><?php
/**
 * @package Scheduler
 * @subpackage RecalculateCache
 */

/**
 * Will recalculate cached objects 
 *
 * @package Scheduler
 * @subpackage RecalculateCache
 */
class KAsyncRecalculateCache extends KJobHandlerWorker
{
	/* (non-PHPdoc)
	 * @see KBatchBase::getType()
	 */
	public static function getType()
	{
		return KalturaBatchJobType::RECALCULATE_CACHE;
	}
	
	/* (non-PHPdoc)
	 * @see KJobHandlerWorker::exec()
	 */
	protected function exec(KalturaBatchJob $job)
	{
		return $this->recalculate($job, $job->data);
	}
	
	private function recalculate(KalturaBatchJob $job, KalturaRecalculateCacheJobData $data)
	{
		KalturaLog::debug("Recalculate job id [$job->id]");
		
		$engine = KRecalculateCacheEngine::getInstance($job->jobSubType);
		$engine->configure($job->partnerId);
		$recalculatedObjects = $engine->recalculate($data);
		return $this->closeJob($job, null, null, "Recalculated $recalculatedObjects cache objects", KalturaBatchJobStatus::FINISHED);
	}
}<commit_msg>There is no configure method<commit_after><?php
/**
 * @package Scheduler
 * @subpackage RecalculateCache
 */

/**
 * Will recalculate cached objects 
 *
 * @package Scheduler
 * @subpackage RecalculateCache
 */
class KAsyncRecalculateCache extends KJobHandlerWorker
{
	/* (non-PHPdoc)
	 * @see KBatchBase::getType()
	 */
	public static function getType()
	{
		return KalturaBatchJobType::RECALCULATE_CACHE;
	}
	
	/* (non-PHPdoc)
	 * @see KJobHandlerWorker::exec()
	 */
	protected function exec(KalturaBatchJob $job)
	{
		return $this->recalculate($job, $job->data);
	}
	
	private function recalculate(KalturaBatchJob $job, KalturaRecalculateCacheJobData $data)
	{
		KalturaLog::debug("Recalculate job id [$job->id]");
		
		$engine = KRecalculateCacheEngine::getInstance($job->jobSubType);
		$recalculatedObjects = $engine->recalculate($data);
		return $this->closeJob($job, null, null, "Recalculated $recalculatedObjects cache objects", KalturaBatchJobStatus::FINISHED);
	}
}
{'fraction_non_alphanumeric': 0.1361336032388664, 'fraction_numerical': 0.0, 'mean_word_length': 5.46078431372549, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '410606', 'n_tokens_mistral': 695, 'n_tokens_neox': 646, 'n_words': 123}