Repository navigation
Refactor and fix Backfill commands - #352
Conversation
5dac8f0 to
075a5c0
Compare
|
@johnbaldwin I addressed your comment (thanks!) and this is ready for your review now. |
|
@bryanlandia There's a bunch here and it is way too late for me, so I'm going to pick up the review again tomorrow to make sure I don't miss something. My biggest concern is that we don't break existing django management commands that would be used with cron instead of celerybeat, namely that this PR removes |
|
@bryanlandia I've looked over the backfill commands. Aside from preserving I ask this only as a measure against management command naming collisions. The chance of this is pretty low now. I don't see any other commands with The only other interface related thing with backfill commands is that I'm interested in what you see is the advantage of having multiple different commands rather than have one |
9396d94 to
1e03312
Compare
is_past_date helper method
Progress values are not accurate for past dates as we do not use StudentModuleHistory or Persistent Grades, but always check the current value of StudentModule, which will give values accurate only for the time they are retrieved from the db.
Still output for each course/day to debug log backfill_daily_metrics msg re skip CDM.average_progress for past date Cleanup for backfill commands
Can happen if time period is filled entirely by backfilling
pass --mau usage to new run_figures_mau_metrics pass other usage to backfill_figures_daily_metrics (with start and end date of single date passed )
Calls backfill_daily_metrics and backfill_monthly_metrics, w/options
1e03312 to
7ae08e3
Compare
This PR addresses some shortcomings of previous Figures data backfill picture. It does some things:
The old stuff:
Marks backfill_figures_metrics and populate_figures_metrics commands as pending deprecation. Replaces their handlers with calls to the new backfill commands.
The new stuff:
BaseBackfillCommand
You can pass a start date, end date, site id/domain, overwrite yes/no, and no_delay yes/no to all commands below subclassing this. Ovewrite will replace existing objects, no_delay will directly call Celery tasks instead of queueing them via RabbitMQ
backfill_figures_daily_metrics
Uses the experimental method if that option is passed, but I didn't worry much about that, since I don't think it was every really finished.
repair_figures_backfilled_progress
backfill_figures_monthly_metrics
backfill_figures_enrollment_data