Esempio n. 1
0
    def register_app(self, app_id):
        """Register a new long-running app process.
        """
        global job_manager
        if app_id is not None:
            if job_manager is None:
                job_manager = KBjobManager()

            self._event('debug', app_id)
            if app_id.find(':') == -1:
                job_manager.register_job(app_id)
            self._event('register_app', app_id)
Esempio n. 2
0
    def register_app(self, app_id):
        """Register a new long-running app process.
        """
        global job_manager
        if app_id is not None:
            if job_manager is None:
                job_manager = KBjobManager()

            self._event('debug', app_id)
            if app_id.find(':') == -1:
                job_manager.register_job(app_id)
            self._event('register_app', app_id)
Esempio n. 3
0
    def register_job(self, job_id):
        """Register a new long-running job.
        """
        global job_manager
        if job_id is not None:
            if job_manager is None:
                job_manager = KBjobManager()

            self._event('debug', job_id)
            # njs jobs start with either
            # 'njs:' or 'method:' - either way
            # they're the only ones with a colon
            if job_id.find(':') == -1:
                job_manager.register_job(job_id)
            self._event('register_job', job_id)
Esempio n. 4
0
    def register_job(self, job_id):
        """Register a new long-running job.
        """
        global job_manager
        if job_id is not None:
            if job_manager is None:
                job_manager = KBjobManager()

            self._event('debug', job_id)
            # njs jobs start with either
            # 'njs:' or 'method:' - either way
            # they're the only ones with a colon
            if job_id.find(':') == -1:
                job_manager.register_job(job_id)
            self._event('register_job', job_id)
Esempio n. 5
0
    def register_app(self, app_id):
        """Register a new long-running app process.
        """
        global job_manager
        if app_id is not None:
            if job_manager is None:
                job_manager = KBjobManager()

            self._event('debug', app_id)
            try:
                unprefixed_app_id = app_id
                if app_id.find(':') >= 0:
                    unprefixed_app_id = app_id.split(':')[1]
                job_manager.register_job(unprefixed_app_id)
            except Exception as e:
                # It should be logged somehow
                to_log = type(e).__name__ + ': ' + str(e) + '\n' + traceback.format_exc()
                self._event('debug', to_log)
            self._event('register_app', app_id)
Esempio n. 6
0
    def register_app(self, app_id):
        """Register a new long-running app process.
        """
        global job_manager
        if app_id is not None:
            if job_manager is None:
                job_manager = KBjobManager()

            self._event('debug', app_id)
            try:
                unprefixed_app_id = app_id
                if app_id.find(':') >= 0:
                    unprefixed_app_id = app_id.split(':')[1]
                job_manager.register_job(unprefixed_app_id)
            except Exception as e:
                # It should be logged somehow
                to_log = type(e).__name__ + ': ' + str(
                    e) + '\n' + traceback.format_exc()
                self._event('debug', to_log)
            self._event('register_app', app_id)
Esempio n. 7
0
    def register_job(self, job_id):
        """Register a new long-running job.
        """
        global job_manager
        if job_id is not None:
            if job_manager is None:
                job_manager = KBjobManager()

            self._event('debug', job_id)
            # njs jobs start with either
            # 'njs:' or 'method:' - either way
            # they're the only ones with a colon
            try:
                unprefixed_job_id = job_id
                if job_id.find(':') >= 0:
                    unprefixed_job_id = job_id.split(':')[1]
                job_manager.register_job(unprefixed_job_id)
            except Exception as e:
                to_log = type(e).__name__ + ': ' + str(e) + '\n' + traceback.format_exc()
                self._event('debug', to_log)
            self._event('register_job', job_id)
Esempio n. 8
0
    def register_job(self, job_id):
        """Register a new long-running job.
        """
        global job_manager
        if job_id is not None:
            if job_manager is None:
                job_manager = KBjobManager()

            self._event('debug', job_id)
            # njs jobs start with either
            # 'njs:' or 'method:' - either way
            # they're the only ones with a colon
            try:
                unprefixed_job_id = job_id
                if job_id.find(':') >= 0:
                    unprefixed_job_id = job_id.split(':')[1]
                job_manager.register_job(unprefixed_job_id)
            except Exception as e:
                to_log = type(e).__name__ + ': ' + str(
                    e) + '\n' + traceback.format_exc()
                self._event('debug', to_log)
            self._event('register_job', job_id)