示例#1
0
    def handle(self, *args, **kwargs):
        autodiscover()

        metrics = Metric.objects.filter(do_collect=True)
        logger.info("Faking 60 days of data samples for %s Metrics", metrics.count())

        for metric in metrics:
            self._get_samples_for_metric(dbag_manager, metric)
示例#2
0
    def handle(self, *args, **kwargs):
        autodiscover()

        logger.info("Loading initial dbag metrics")
        management.call_command('loaddata',
                                'dbag_initial_metrics.json',
                                verbosity=0,
                                interactive=False)
示例#3
0
    def handle(self, *args, **kwargs):
        autodiscover()

        metrics = Metric.objects.filter(do_collect=True)
        logger.info("Faking 60 days of data samples for %s Metrics",
                    metrics.count())

        for metric in metrics:
            self._get_samples_for_metric(dbag_manager, metric)
示例#4
0
    def handle(self, *args, **kwargs):
        autodiscover()

        num_metrics = Metric.objects.filter(do_collect=True).count()
        logger.info("Collecting data samples for %s Metrics", num_metrics)

        data_samples = dbag_manager.collect_metrics()

        logger.info("Collected %s data samples", len(data_samples))
示例#5
0
from django.conf.urls.defaults import patterns, include

import dbag
dbag.autodiscover()

urlpatterns = patterns('',
   (r'^dbag/', include('dbag.urls')),
)

示例#6
0
    def handle(self, *args, **kwargs):
        autodiscover()

        logger.info("Loading initial dbag metrics")
        management.call_command(
            'loaddata', 'dbag_initial_metrics.json', verbosity=0, interactive=False)