Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-4011

Plugin ConnectWorldserver: no state error on task export for re-transfer to Worldserver

    XMLWordPrintable

Details

    • Critical
    • task is not set to state error on export

    Description

      Thomas @Stephan
      the easiest one: the export worker produces an exception, then the \MittagQI\Translate5\Plugins\ConnectWorldserver\ConnectWorldserver::taskLogException method is called which is then setting the task to status error. Status error would be ok on import, but for export that makes no sense. Image the export would be successfull with different options, but thats not possible due the status error here.
      Can you please fix that? (inclusive creating an issue etc) should not be a big thing.

      Stephan @Thomas
      hmm.. have to think about that.
      Export is triggered automatically after last workflow-step is finished.
      So hard to imagine how someone can change any settings here.

      Remark of Thomas:
      This should be completely removed here. A logging function should not set tasks to status error. And this is imho not necessary: the WsTaskPostprocessing worker is implementing a editor_Models_Task_AbstractWorker which is using \MittagQI\Translate5\Task\Worker\Behaviour which is automatically setting task to error if task is in status import on exceptions in the worker. In other words the setState(error) is doppel gemoppelt here and not needed.

      Repeat on that
      Hi Thomas,
      while task is NOT in state “import” when the plugin works with it, I have to handle it on my own.
      But, as you mentioned, it may is not a good idea to do it in a “log”-function.
      Therefore I moved it one level higher in the places where its needed.

      While task is in “preparation” it will set the task to state error if something went wrong.
      In the post-processing it will not be set to error any more.

      Attachments

        Activity

          People

            Stephan Stephan Bergmann
            Stephan Stephan Bergmann
            Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: