Skip to content
Extraits de code Groupes Projets
Valider 6be2fdfa rédigé par cerdic's avatar cerdic
Parcourir les fichiers

- Quand une insertion de tache avec unicite est demandee, renvoyer l'id_job de...

- Quand une insertion de tache avec unicite est demandee, renvoyer l'id_job de la tache deja existante le cas echeant pour permettre son execution immediate, et non false
- documentation sur l'argument d'inclusion de job_queue_add
- bouton 'Executer maintenant' pas en ajax pour permettre du debug dans la tache
parent 6815a7fa
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -57,12 +57,12 @@ function queue_add_job($function, $description, $arguments = array(), $file = '' ...@@ -57,12 +57,12 @@ function queue_add_job($function, $description, $arguments = array(), $file = ''
if ( if (
$no_duplicate $no_duplicate
AND AND
sql_countsel('spip_jobs', $id_job = sql_getfetsel('id_job','spip_jobs',
'status='.intval(_JQ_SCHEDULED).' AND fonction='.sql_quote($function) 'status='.intval(_JQ_SCHEDULED).' AND fonction='.sql_quote($function)
.(($no_duplicate==='function_only')?'': .(($no_duplicate==='function_only')?'':
' AND md5args='.sql_quote($md5args).' AND inclure='.sql_quote($file))) ' AND md5args='.sql_quote($md5args).' AND inclure='.sql_quote($file)))
) )
return false; return $id_job;
// si pas de date programee, des que possible // si pas de date programee, des que possible
if (!$time) if (!$time)
......
...@@ -597,7 +597,8 @@ function cron ($taches=array(), $taches_old= array()) { ...@@ -597,7 +597,8 @@ function cron ($taches=array(), $taches_old= array()) {
* @param $arguments * @param $arguments
* Optional array of arguments to pass to the function. * Optional array of arguments to pass to the function.
* @param $file * @param $file
* Optional file path which needs to be included for $fucntion. * Optional file path which needs to be included for $function.
* if ends with '/', will do charger_fonction($function,$file);
* @param $no_duplicate * @param $no_duplicate
* If TRUE, do not add the job to the queue if one with the same function and * If TRUE, do not add the job to the queue if one with the same function and
* arguments already exists. * arguments already exists.
......
...@@ -22,7 +22,7 @@ genie_queue_watch_dist(); ...@@ -22,7 +22,7 @@ genie_queue_watch_dist();
[(#AUTORISER{'annuler','job',#ID_JOB}|oui) [(#AUTORISER{'annuler','job',#ID_JOB}|oui)
<div class="actions"> <div class="actions">
[(#BOUTON_ACTION{<:annuler:>,#URL_ACTION_AUTEUR{annuler_job,#ID_JOB,#SELF},ajax})] [(#BOUTON_ACTION{<:annuler:>,#URL_ACTION_AUTEUR{annuler_job,#ID_JOB,#SELF},ajax})]
[(#BOUTON_ACTION{<:queue_executer_maintenant:>,#URL_ACTION_AUTEUR{forcer_job,#ID_JOB,#SELF},ajax})] [(#BOUTON_ACTION{<:queue_executer_maintenant:>,#URL_ACTION_AUTEUR{forcer_job,#ID_JOB,#SELF}})]
</div> </div>
] ]
</li> </li>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter