Projet

Général

Profil

Bug #24241

crash cron et saut sur place et erreur d'appel webservice

Ajouté par Frédéric Péters il y a presque 6 ans. Mis à jour il y a plus de 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
03 juin 2018
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Exception:
  type = '<type 'exceptions.AttributeError'>', value = ''NoneType' object has no attribute 'get_path''

Stack trace (most recent call first):
  File "/usr/lib/python2.7/dist-packages/wcs/wf/wscall.py", line 48, in view
    46
    47     def view(self):
>   48         if not get_request().get_path().startswith('/backoffice/'):
    49             return ''
    50         r = TemplateIO(html=True)

  locals:
     self = <wcs.wf.wscall.JournalWsCallErrorPart instance at 0x7fb21fae82d8>

  File "/usr/lib/python2.7/dist-packages/wcs/formdata.py", line 176, in display_parts
   174             if not hasattr(p, 'view'):
   175                 continue
>  176             l.append(p.view())
   177         self._display_parts = l
   178         return self._display_parts

  locals:
     l = []
     p = <wcs.wf.wscall.JournalWsCallErrorPart instance at 0x7fb21fae82d8>
     self = <wcs.formdata.Evolution object at 0x7fb21fa94f90>

  File "/usr/lib/python2.7/dist-packages/wcs/formdata.py", line 567, in jump_status
   565               and self.evolution[-1].status == status
   566               and not self.evolution[-1].comment
>  567               and not self.evolution[-1].display_parts()):
   568             # if status do not change and last evolution is empty,
   569             # just update last jump time on last evolution, do not add one

  locals:
     self = <Contacter-Le-Service-De-La-Collecte-Des-Dechets 'Demande de composteur - n\xc2\xb0338693' id:4132>
     status = 'wf-5'
     status_id = '5'

  File "/usr/lib/python2.7/dist-packages/wcs/wf/jump.py", line 41, in jump_and_perform
    39         formdata.update_workflow_data(workflow_data)
    40         formdata.store()
>   41     formdata.jump_status(status)
    42     url = formdata.perform_workflow()
    43     return url

Fichiers

Révisions associées

Révision a1d072bd (diff)
Ajouté par Frédéric Péters il y a presque 6 ans

workflows: ignore webservice errors when evaluating evolution emptyness (#24241)

Historique

#1

Mis à jour par Frédéric Péters il y a presque 6 ans

        elif (self.status == status
              and self.evolution[-1].status == status
              and not self.evolution[-1].comment
              and not self.evolution[-1].display_parts()):
            # if status do not change and last evolution is empty,
            # just update last jump time on last evolution, do not add one

Question intéressante ici, une évolution qui contient l'info comme quoi l'appel webservice a échoué, on la considère vide, ou pas ?

Je pense qu'on peut ignorer, et que l'historique de ces erreurs se perde.

#2

Mis à jour par Thomas Noël il y a presque 6 ans

Sauf que là, ça devient vrai seulement s'il s'agit d'un saut lors d'un cron... Mais je ne vois pas d'autre alternative simple (la vraie solution sera d'avoir un journal technique séparé des évolutions "pour les gens").

Ack.

#3

Mis à jour par Frédéric Péters il y a presque 6 ans

  • Statut changé de En cours à Résolu (à déployer)
commit a1d072bd0f531cacba7658c73a6755b7d5f05fd4
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Sun Jun 3 07:00:33 2018 +0200

    workflows: ignore webservice errors when evaluating evolution emptyness (#24241)
#7

Mis à jour par Frédéric Péters il y a plus de 5 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF