예제 #1
0
def populate_site_daily_metrics(**kwargs):
    '''Populate a SiteDailyMetrics record
    '''
    logger.debug("populate_site_daily_metrics called")
    SiteDailyMetricsLoader().load(
        date_for=kwargs.get('date_for', None),
        force_update=kwargs.get('force_update', False),
    )
    logger.debug('done running populate_site_daily_metrics')
예제 #2
0
파일: tasks.py 프로젝트: fava9410/figures
def populate_site_daily_metrics(site_id, **kwargs):
    '''Populate a SiteDailyMetrics record
    '''
    logger.debug(
        'populate_site_daily_metrics called for site_id={}'.format(site_id))
    SiteDailyMetricsLoader().load(
        site=Site.objects.get(id=site_id),
        date_for=kwargs.get('date_for', None),
        force_update=kwargs.get('force_update', False),
    )
    logger.debug(
        'done running populate_site_daily_metrics for site_id={}"'.format(
            site_id))
예제 #3
0
파일: tasks.py 프로젝트: ponytojas/figures
def populate_single_sdm(site_id, date_for, force_update=False):
    """Populate a SiteDailyMetrics record

    This is simply a Celery task wrapper around the call to collect data into
    the SiteDailyMetrics record for the given site and date_for.
    """
    logger.debug('populate_single_sdm: site_id={}'.format(site_id))

    SiteDailyMetricsLoader().load(site=Site.objects.get(id=site_id),
                                  date_for=date_for,
                                  force_update=force_update)

    logger.debug(
        'done running populate_site_daily_metrics for site_id={}'.format(site_id))