Exemple #1
0
    def start(self, applicationModel):
        self.logger = applicationModel.getEngine().getService(IZAppServiceIDs.LOGGER_SERVICE_ID)
        self.logger.debug(u"Auto-Update Service started.") #$NON-NLS-1$
        self.stopped = False

        runner = ZAutoUpdateRunnable(self, True)
        thread = ZThread(runner, u"AutoUpdate", True) #$NON-NLS-1$
        thread.start()
Exemple #2
0
    def _startListening(self):
        sysProfile = self.applicationModel.getSystemProfile()

        port = sysProfile.getProperties().getPropertyInt(
            u"/system-properties/singleton/port", 84113)  #$NON-NLS-1$
        self.server = SimpleXMLRPCServer.SimpleXMLRPCServer(
            (u"localhost", port), logRequests=False)  #$NON-NLS-1$
        self.server.register_instance(ZRavenRPCServer(self))

        self.logger.debug(u"Singleton server created on port %d." %
                          port)  #$NON-NLS-1$

        thread = ZThread(self, u"ZSingletonService", True)  #$NON-NLS-1$
        thread.start()
Exemple #3
0
    def onBeginBackroundTask(self, event):  #@UnusedVariable
        self._cancelTask()
        # save button states
        self.bgTaskPreviousButtonState = self._isButtonEnabledById(
            ZID_PREVIOUS)
        self.bgTaskNextButtonState = self._isButtonEnabledById(ZID_NEXT)
        # disable buttons
        self._enableNextButton(False)
        self._enablePreviousButton(False)

        self.bgTask = event.getTask()
        #        wizardTask.run()
        thread = ZThread(self.bgTask, u"ZWizardTaskThread", True)  #$NON-NLS-1$
        thread.start()
        event.Skip()
Exemple #4
0
    def start(self, applicationModel):
        self.queue = Queue(0)
        userProfile = applicationModel.getUserProfile()
        self.usageDir = userProfile.getDirectory(u"usage") #$NON-NLS-1$

        engine = applicationModel.getEngine()
        self.logger = engine.getService(IZBlogAppServiceIDs.LOGGER_SERVICE_ID)
        self.logger.debug(u"Anonymous Usage Statistics Service started.") #$NON-NLS-1$

        accountStore = engine.getService(IZBlogAppServiceIDs.ACCOUNT_STORE_SERVICE_ID)
        dataStore = engine.getService(IZBlogAppServiceIDs.DATA_STORE_SERVICE_ID)
        mediaStoreService = engine.getService(IZBlogAppServiceIDs.MEDIA_STORAGE_SERVICE_ID)

        accountStore.addListener(self)
        dataStore.addListener(self)
        mediaStoreService.addListener(self)

        self.done = False
        self.running = True
        thread = ZThread(self, u"ZUsageStatisticsService", True) #$NON-NLS-1$
        thread.start()
Exemple #5
0
 def checkForUpdate(self, onlyPromptWhenNewVersionIsAvailable = True):
     runner = ZAutoUpdateRunnable(self, onlyPromptWhenNewVersionIsAvailable)
     thread = ZThread(runner, u"AutoUpdate", True) #$NON-NLS-1$
     thread.start()
Exemple #6
0
 def startTest(self):
     self.thread = ZThread(self.ztest, u"ZTestThread", True) #$NON-NLS-1$
     self.thread.start()
Exemple #7
0
 def _resumeTask(self, task):
     task.attachListener(self)
     name = u"bgtask:id:%s" % str(task.getId())  #$NON-NLS-1$
     thread = ZThread(task, name, True)
     thread.start()
Exemple #8
0
 def cancelAsync(self):
     thread = ZThread(ZMethodRunnable(self.cancel), u"CancelTask",
                      True)  #$NON-NLS-1$
     thread.start()
Exemple #9
0
 def onRefreshBlogList(self, event):  #@UnusedVariable
     thread = ZThread(ZListBlogsTasks(self),
                      u"ZSynchronizeAccountBlogsDialog.ZListBlogsTasks",
                      True)  #$NON-NLS-1$
     thread.start()