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)
def handle(self, *args, **kwargs): autodiscover() logger.info("Loading initial dbag metrics") management.call_command('loaddata', 'dbag_initial_metrics.json', verbosity=0, interactive=False)
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))
from django.conf.urls.defaults import patterns, include import dbag dbag.autodiscover() urlpatterns = patterns('', (r'^dbag/', include('dbag.urls')), )
def handle(self, *args, **kwargs): autodiscover() logger.info("Loading initial dbag metrics") management.call_command( 'loaddata', 'dbag_initial_metrics.json', verbosity=0, interactive=False)