示例#1
0
    def get(self, request):
        commit, msg = get_git_head()
        base_dir = settings.BASE_DIR
        hostname = socket.gethostname()
        django_version = django.VERSION

        feed_queue_status = self._get_feed_queue_status()
        num_index_outdated = self._get_num_outdated_search_index()
        avg_podcast_update_duration = self._get_avg_podcast_update_duration()

        return self.render_to_response({
            "git_commit":
            commit,
            "git_msg":
            msg,
            "base_dir":
            base_dir,
            "hostname":
            hostname,
            "django_version":
            django_version,
            "num_celery_tasks":
            self._get_waiting_celery_tasks(),
            "avg_podcast_update_duration":
            avg_podcast_update_duration,
            "feed_queue_status":
            feed_queue_status,
            "num_index_outdated":
            num_index_outdated,
        })
示例#2
0
    def get(self, request):
        commit, msg = get_git_head()
        base_dir = settings.BASE_DIR
        hostname = socket.gethostname()
        django_version = django.VERSION

        feed_queue_status = self._get_feed_queue_status()
        num_index_outdated = self._get_num_outdated_search_index()
        avg_podcast_update_duration = self._get_avg_podcast_update_duration()

        return self.render_to_response({
            'git_commit':
            commit,
            'git_msg':
            msg,
            'base_dir':
            base_dir,
            'hostname':
            hostname,
            'django_version':
            django_version,
            'num_celery_tasks':
            self._get_waiting_celery_tasks(),
            'avg_podcast_update_duration':
            avg_podcast_update_duration,
            'feed_queue_status':
            feed_queue_status,
            'num_index_outdated':
            num_index_outdated,
        })
示例#3
0
文件: views.py 项目: fk-lx/mygpo
    def get(self, request):
        commit, msg = get_git_head()
        base_dir = settings.BASE_DIR
        hostname = socket.gethostname()
        django_version = django.VERSION

        main_db = get_main_database()

        db_tasks = main_db.server.active_tasks()

        i = celery.control.inspect()
        scheduled = i.scheduled()
        if not scheduled:
            num_celery_tasks = None
        else:
            num_celery_tasks = sum(len(node) for node in scheduled.values())

        feed_queue_status = self._get_feed_queue_status()

        return self.render_to_response({
            'git_commit': commit,
            'git_msg': msg,
            'base_dir': base_dir,
            'hostname': hostname,
            'django_version': django_version,
            'main_db': main_db.uri,
            'db_tasks': db_tasks,
            'num_celery_tasks': num_celery_tasks,
            'feed_queue_status': feed_queue_status,
        })
示例#4
0
文件: views.py 项目: gpodder/mygpo
    def get(self, request):
        commit, msg = get_git_head()
        base_dir = settings.BASE_DIR
        hostname = socket.gethostname()
        django_version = django.VERSION

        feed_queue_status = self._get_feed_queue_status()
        num_index_outdated = self._get_num_outdated_search_index()
        avg_podcast_update_duration = self._get_avg_podcast_update_duration()

        return self.render_to_response(
            {
                'git_commit': commit,
                'git_msg': msg,
                'base_dir': base_dir,
                'hostname': hostname,
                'django_version': django_version,
                'num_celery_tasks': self._get_waiting_celery_tasks(),
                'avg_podcast_update_duration': avg_podcast_update_duration,
                'feed_queue_status': feed_queue_status,
                'num_index_outdated': num_index_outdated,
            }
        )
示例#5
0
文件: views.py 项目: sandebert/mygpo
    def get(self, request):
        commit, msg = get_git_head()
        base_dir = settings.BASE_DIR
        hostname = socket.gethostname()
        django_version = django.VERSION

        i = celery.control.inspect()
        scheduled = i.scheduled()
        if not scheduled:
            num_celery_tasks = None
        else:
            num_celery_tasks = sum(len(node) for node in scheduled.values())

        feed_queue_status = self._get_feed_queue_status()

        return self.render_to_response({
            'git_commit': commit,
            'git_msg': msg,
            'base_dir': base_dir,
            'hostname': hostname,
            'django_version': django_version,
            'num_celery_tasks': num_celery_tasks,
            'feed_queue_status': feed_queue_status,
        })