notify_credentials job when executed without
any restriction consumes a lot of memory
because of huge dataset that makes
it unsuable to be executed periodically.
This patch would time bound it to only work
on last day dataset.
PROD-1190
To save the memory get cert and grade object directly from
the db because by doing that we'll override the queryset
evaluation and object won't be cached once it has gone out
of scope.
PROD-987
To allow the notify_credentials management command to run from a
jenkins job, we want to allow the command to pull its arguments
from the database, rather than the jenkins interface.
So this adds a table that admins can adjust in the DB and a new
argument for notify_credentials to tell it to go look there.
LEARNER-6196
LEARNER-6197
When notifying credentials of cert/grade changes using
notify_credentials, don't worry about signaling for program cert
awards. (A) We don't need that functionality right now when
backpopulating credentials records, and (B) we have other management
commands for that anyway.
notify_credentials was flattening a queryset when it shouldn't have,
which was exploding a large query all into memory. Hopefully this will
help with that.
This command will trigger old data about certificates or grades to
be sent to the Credentials service, for initial population or if
something goes wrong and we need to cover a downtime gap.
LEARNER-5378