TermTagger-Import defect Segments message is shown to often

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • None
    • Affects Version/s: None
    • Component/s: TermTagger integration

      If a segment is marked as defect in importing process, the defect message is logged for every following segment.

      Way to reproduce:

      • choose a project
      • mark all segments as untagged:
      UPDATE `LEK_segments_meta` SET  `termtagState` =  'untagged' WHERE
      `LEK_segments_meta`.`taskGuid` =  'TASKGUID';
      
      INSERT INTO `Zf_worker` (`state`, `worker`, `resource`, `slot`,
      `maxParallelProcesses`, `taskGuid`, `parameters`, `pid`, `starttime`,
      `endtime`, `maxRuntime`, `hash`, `blockingType`) VALUES
      ('waiting', 'editor_Plugins_TermTagger_Worker_TermTaggerImport',
      'TermTagger_import', 'http://localhost:9001', 1, 'TASKGUID',
      'a:1:{s:12:"resourcePool";s:6:"import";}', NULL, '', NULL, '',
      '552429c8ebd408.52068674', 'slot');
      
      • trigger an segment tag error by adding the following code at the top of editor_Plugins_TermTagger_Service::tagterms
              if(!empty($data->segments)) {
                  foreach($data->segments as $x) {
                      if($x->id == XXX) {
                          throw new editor_Plugins_TermTagger_Exception_Malfunction("DEBUG");
                      }
                  }
              }
      

      where XXX is a segmentid of an segment which is faked as defect. Should be one of the first segments in the task, not the last one!

      • trigger the worker by calling /editor/worker/queue

            Assignee:
            Unassigned
            Reporter:
            Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: