Replace some print statements with logging calls.
This commit is contained in:
parent
4ac4193200
commit
1289a42e4b
|
@ -797,13 +797,10 @@ class PurgeBatchesCommand(Subcommand):
|
|||
from rattail.db.util import obfuscate_url_pw
|
||||
from rattail.db.batches import util
|
||||
|
||||
self.stdout.write("Purging batches from database:\n")
|
||||
self.stdout.write(" {0}\n".format(obfuscate_url_pw(Session.kw['bind'].url)))
|
||||
|
||||
log.info("purging batches from database: {0}".format(obfuscate_url_pw(Session.kw['bind'].url)))
|
||||
normal = util.purge_batches(effective_date=args.date, purge_everything=args.all)
|
||||
orphaned = util.purge_orphaned_batches()
|
||||
|
||||
self.stdout.write("\nPurged {0} normal and {1} orphaned batches.\n".format(normal, orphaned))
|
||||
log.info("purged {0} normal and {1} orphaned batches".format(normal, orphaned))
|
||||
|
||||
|
||||
def main(*args):
|
||||
|
|
Loading…
Reference in a new issue