def import_hook(self, product_usage): _LOG.info("called create_hook") items_not_imported, start_stop_time = import_util.import_data(product_usage, force_import=True) _LOG.info("items_not_imported length: " + str(len(items_not_imported))) for i in items_not_imported: thisDict = i.to_dict() thisItem = QuarantinedReportData(**thisDict) thisItem.save() return items_not_imported
def drop_collections(self): MarketingReportData.drop_collection() QuarantinedReportData.drop_collection()