def _agg_awc_table(day): with transaction.atomic(using=db_for_read_write(AggAwc)): _run_custom_sql_script([ "SELECT create_new_aggregate_table_for_month('agg_awc', %s)" ], day) AggAwc.aggregate(force_to_date(day))
def _agg_awc_table_weekly(day): with transaction.atomic(using=db_for_read_write(AggAwc)): AggAwc.weekly_aggregate(force_to_date(day))