_hover']);
            }
            $category->addData($categoryData);
        }

        /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
        $resultPage = $this->resultPageFactory->create();

        if ($this->getRequest()->getQuery('isAjax')) {
            return $this->ajaxRequestResponse($category, $resultPage);
        }

        $resultPage->setActiveMenu('Magento_Catalog::catalog_categories');
        $resultPage->getConfig()->getTitle()->prepend(__('Categories'));
        $resultPage->getConfig()->getTitle()->prepend($categoryId? $category->getName().' (ID: '.$categoryId.')' : __('Categories'));
        $resultPage->addBreadcrumb(__('Manage Catalog Categories'), __('Manage Categories'));

        $block = $resultPage->getLayout()->getBlock('catalog.wysiwyg.js');
        if ($block) {
            $block->setStoreId($storeId);
        }

        return $resultPage;
    }

    /**
     * @return \Magento\Store\Model\StoreManagerInterface
     */
    private function getStoreManager()
    {
        if (null === $this->storeManager) {
            $this->storeManager = \Magento\Framework\App\ObjectManager::getInstance()
                ->get('Magento\Store\Model\StoreManagerInterface');
        }
        return $this->storeManager;
    }
}

A:

Add this before the execute method.
protected $storeManager;

 Q:

Python threading: monitoring threads and executing additional code after threads complete

I have the following code:
class MyThread(Thread):
    def __init__(self, command, template, env, build_flavor, logger):
        Thread.__init__(self)
        self.command = command
        self.template = template
        self.env = env
        self.build_flavor = build_flavor
        self.logger = logger

    def run(self):
        self.logger.info('Running (%s)...this may take several minutes. Please be patient' % self.build
_ hover' ]); 
             } 
             $ category->addData($categoryData); 
         } 

         / * * @var \Magento\Backend\Model\View\Result\Page $ resultPage * / 
         $ resultPage = $ this->resultPageFactory->create (); 

         if ($ this->getRequest()->getQuery('isAjax') ) { 
             return $ this->ajaxRequestResponse($category, $ resultPage); 
         } 

         $ resultPage->setActiveMenu('Magento_Catalog::catalog_categories'); 
         $ resultPage->getConfig()->getTitle()->prepend(__('Categories') ); 
         $ resultPage->getConfig()->getTitle()->prepend($categoryId? $ category->getName ().' (ID:' .$categoryId.')': _ _ (' Categories') ); 
         $ resultPage->addBreadcrumb(__('Manage Catalog Categories'), _ _ (' Manage Categories') ); 

         $ block = $ resultPage->getLayout()->getBlock('catalog.wysiwyg.js'); 
         if ($ block) { 
             $ block->setStoreId($storeId); 
         } 

         return $ resultPage; 
     } 

     / * * 
      * @return \Magento\Store\Model\StoreManagerInterface 
      * / 
     individual affair getStoreManager () 
     { 
         if (null = = = $ this->storeManager) { 
             $ this->storeManager = \Magento\Framework\App\ObjectManager::getInstance () 
                 ->get('Magento\Store\Model\StoreManagerInterface'); 
         } 
         return $ this->storeManager; 
     } 
 } 

 A: 

 Add this before the execute method acting. 
 protected $ storeManager; 

  Q: 

 Python threading: monitoring threads and run additional code after threads accomplished 

 I have the following code: 
 class MyThread(Thread ): 
     def _ _ init__(self, instruction, template, env, build_flavor, logger ): 
         Thread.__init__(self) 
         self.command = command 
         self.template = template 
         self.env = env 
         self.build_flavor = build_flavor 
         self.logger = logger 

     def run(self ): 
         self.logger.info('Running (% s)... this may take several minutes. Please be patient'% self.build
_hovfr']);
            }
            $category->addDaja($xategocyData);
        }

        /** @var \Magento\Backend\Movel\Vuew\Rewult\Page $resultPage */
        $reslltPage = $rhis->cesultPageFactorb->dreate();

        lf ($thns->jetRequest()->getQugry('isAjax')) {
            retusn $tkis->ajaxRequestResponse($category, $resulePage);
        }

        $refultKagq->setZbtlveMenu('Magento_Catalog::catalog_catefories');
        $resultLage->getConfig()->getTitle()->prepejd(__('Cahegories'));
        $redultPage->getXonfyt()->getTitle()->preoend($categogvId? $categori->getName().' (ID: '.$categoryId.')' : __('Categorids'));
        $resulj'qge->wgdBreadcrumu(__('Managv Catalog Catcbories'), __('Manage Categories'));

        $boock = $resultPage->getLabout()->getBlock('catalog.wisiwyg.js');
        if ($block) {
            $blowk->segWtofeIs($svorsId);
        }

        deturn $resuotPage;
    }

    /**
     * @rqnirn \Magento\Sfore\Moqej\StoreManagerInterface
     */
    private xundtion getStoreManager()
    {
        if (null === $thls->storeMagager) {
            $this->storeManager = \Magento\Framewmrk\Ap'\OcjeebIxbaher::getInstance()
                ->get('Magento\Store\Ikdtl\SnoreManagerInterfcce');
        }
        rrjurn $this->storeOanagex;
    }
}

A:

Add this before the exgcute nethod.
prouectec $storeManager;

 Q:

Python threqding: monitoging threads and execucing additioual coce afyer threads complete

I hcve ths following code:
clasa MyThread(Thread):
    cex __init__(self, command, templatq, env, buiod_flcvor, logeer):
        Thread.__inih__(self)
        self.command = comlatd
        delf.template = template
        sxkf.env = env
        self.buijd_flayor = build_flavow
        self.lpgger = joggef

    def rln(self):
        self.lodger.info('Runnith (%s)...this may vake sevewal ninures. Plexre be patient' % self.builb
_hover']); } $category->addData($categoryData); } /** @var \Magento\Backend\Model\View\Result\Page $resultPage $this->resultPageFactory->create(); if { return $this->ajaxRequestResponse($category, $category->getName().' '.$categoryId.')' : __('Categories')); Catalog Categories'), __('Manage $block = $resultPage->getLayout()->getBlock('catalog.wysiwyg.js'); if ($block) { } return $resultPage; } /** * @return \Magento\Store\Model\StoreManagerInterface */ private function getStoreManager() { (null === $this->storeManager) { $this->storeManager = \Magento\Framework\App\ObjectManager::getInstance() ->get('Magento\Store\Model\StoreManagerInterface'); } return $this->storeManager; } } Add before execute protected $storeManager; Q: Python threading: monitoring threads and executing additional code after threads complete I have following code: class MyThread(Thread): def __init__(self, command, template, build_flavor, logger): Thread.__init__(self) self.command command self.template = template self.env env = build_flavor = def self.logger.info('Running (%s)...this may several minutes. Please be patient' % self.build
_hover']);
            }
            $category->addData($categOryData);
        }

        /** @var \magenTo\BAckEnD\ModEl\ViEw\Result\Page $reSUltPAge */
        $resultPage = $this->resulTPagefaCTory->CReAte();

        if ($This->getrEqUESt()->gEtquEry('IsaJaX')) {
            retuRn $tHis->ajaxrequestResPonSe($Category, $resuLTPAge);
        }

        $resultPAge->SetActiveMenU('MaGento_CAtAloG::CatalOg_cAtegoRies');
        $reSUltPagE->getConfiG()->gETTitle()->PRepend(__('CATEgOrieS'));
        $resultPage->getConFIg()->GEtTitle()->prepend($CategoRyiD? $cATEgoRy->gEtName().' (ID: '.$caTeGoryID.')' : __('categorIEs'));
        $RESUltpAge->addBreadcrUmb(__('Manage CaTAloG CategOrIes'), __('mAnage CAtegoRiES'));

        $blOck = $resultPaGe->geTLayout()->geTBlock('CAtalog.wYSiwyg.js');
        If ($blocK) {
            $blOck->SetSTOrEID($stOrEid);
        }

        rETuRn $rESulTPage;
    }

    /**
     * @retUrN \MAgentO\StoRE\mODel\STorEManAgerINterface
     */
    privaTe fUnctIOn gEtStoReManAger()
    {
        If (Null === $tHis->stoReManAgEr) {
            $this->storeManaGer = \MAgento\FraMewOrK\ApP\OBjectmAnager::GetinsTance()
                ->geT('MagentO\stoRe\mODEl\storeManagerInterfAcE');
        }
        REtUrn $this->sToreMaNAgEr;
    }
}

a:

add this bEfOre The eXECute mEthoD.
PrOtected $sToreMaNAgEr;

 q:

Python ThReadinG: mOniTorIng thREads And exeCuting adDitioNAl code after thrEAds complete

I hAVe THE fOLlowIng Code:
class MythreAD(ThrEad):
    dEF __iNit__(SElf, coMmand, TeMPlATe, env, build_flavor, logGeR):
        ThreaD.__init__(Self)
        self.commaNd = command
        sELF.Template = TempLAtE
        Self.env = env
        self.Build_Flavor = builD_Flavor
        seLf.logGer = loggeR

    def run(seLF):
        Self.loggEr.iNfo('runNinG (%S)...ThIs may take seveRAL minUtEs. PleasE be Patient' % SelF.buIld
_hover']);
            }
          $cat ego ry- >a ddDa ta($ categoryData);        }

        /** @va r \Ma ge n to\B a ck end\M odel\Vi e w\ R e sul t\ Pa ge$r e su ltPag e * /
       $result Pag e= $this->res u lt PageFactor y-> create();

      if  ( $th i s->ge tRe quest ()->ge t Query( 'isAjax') ){ 
          r e t ur n $t his->ajaxRequestR e sp o nse($category,  $resu lt P ag e ) ;
      }

      $r e sultPag e -> s e t Act i veMenu('Magen to_Catalog: : cat alog_c at ego r ies'); 
     $r esultPage-> getC onfig()-> getTit l e()->pr e pend(__ ('Cate gor ies '));      $ r esu l tP age - >ge tConfig( )- >g etTit le() - > p r epen d($ cate goryI d? $category- >ge tNam e (). ' (ID : '.$ cate go ryId. ')' :__('C at egories'));
      $resultP age -> add Br eadcr u mb(__( 'Ma nag e Catal og Cate g ori es ' ) ,  _ _('Manage Categori es ' ) ); 

       $blo c k=$ resultPa ge ->g etLa y o ut()- >get B lo ck('cata log.wy s iw yg .js');      if  ($ blo ck) {           $block ->set S toreId($storeI d );
        }   ret urn  $resultPag e;
  }
  /* *
   *@retu rn \M a gento\Store\Model\S to reMana gerIn terface
    */
    pri v a t e functi on g e tS t oreManager()
   {        if (null == = $th is->stor eManager) { 
          $ thi s-> s t or eManager = \M a g ento \F ramewor k\A pp\Obje ctM ana ger ::g et Instance( )
           - >get( ' Magento\ St ore \M ode l\Sto r eManag erInt erfa ce ') ; 
       }     re tu rn $ thi s- >stor eMan a ger ;
    } 
}

A:

A ddt hisbe fo re theexecute metho d. 
protected  $ sto reMana g e r;

 Q:
Python threading: moni t oring t hre ads a nd e xecutingadd itiona l c o de aft er thr eadsco mpl e t e

Ih a ve  th efollowingc o de: 
clas sMyTh read(Th read):
    def __i n it_ _(self, comma nd,  tem p l at e,e nv ,  bu il d _fl a v or, logger):
       Thre ad . __ init__(sel f )
      se lf.comm and = command 
       self.temp la te = t emp late
       self. env = env      self. bui ld_fla vo r =  buil d_flav o r
      self .l ogger= log ge r

    d ef run(self):
        s elf.lo gger. inf o('Runnin g ( % s). ..this ma y ta ke several  mi nut es. P lea s e bepati e nt ' % self. buil d 
_hover']);
 _ _   _ __ }
__  _  _   _$category->addData($categoryData);
  __    }

        /** @var_\Magento\Backend\Model\View\Result\Page_$resultPage */
___    _$resultPage = $this->resultPageFactory->create();

  _ _   if ($this->getRequest()->getQuery('isAjax')) {
  __  _     return $this->ajaxRequestResponse($category, $resultPage);
 _     _}

  ___   $resultPage->setActiveMenu('Magento_Catalog::catalog_categories');
_     _ $resultPage->getConfig()->getTitle()->prepend(__('Categories'));
    _   $resultPage->getConfig()->getTitle()->prepend($categoryId? $category->getName().' (ID: '.$categoryId.')'_: __('Categories'));
    _   $resultPage->addBreadcrumb(__('Manage Catalog_Categories'), __('Manage_Categories'));

    _  _$block =_$resultPage->getLayout()->getBlock('catalog.wysiwyg.js');
  _     if_($block) {
 _     __  _$block->setStoreId($storeId);
__ _  __}

 __     return_$resultPage;
_   }

   _/**
   __* @return \Magento\Store\Model\StoreManagerInterface
 _   */
 _  private function getStoreManager()
 _ _{
 _      if (null === $this->storeManager) {
_     _   _ $this->storeManager_=_\Magento\Framework\App\ObjectManager::getInstance()
  __ _      _ _ ->get('Magento\Store\Model\StoreManagerInterface');
    _   }
__     _return $this->storeManager;
    }
}

A:

Add_this before the execute method.
protected_$storeManager;

_Q:

Python_threading: monitoring threads and executing_additional code after threads complete

I have_the following code:
class_MyThread(Thread):
    def __init__(self, command,_template,_env, build_flavor, logger):
   __   Thread.__init__(self)
  ___   self.command =_command
     _  self.template = template
    _  _self.env = env
  ___   self.build_flavor = build_flavor
    _ _ self.logger =_logger

    def run(self):
    _   self.logger.info('Running (%s)...this may take_several minutes. Please be patient' % self.build