add logging to csv upload (#6297)

This commit is contained in:
timifasubaa 2018-11-07 18:40:07 -08:00 committed by GitHub
parent 8c0551ed46
commit 77845ab081
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -368,6 +368,7 @@ class CsvToDatabaseView(SimpleFormView):
flash(
message,
'danger')
stats_logger.incr('failed_csv_upload')
return redirect('/csvtodatabaseview/form')
os.remove(path)
@ -378,6 +379,7 @@ class CsvToDatabaseView(SimpleFormView):
form.name.data,
db_name))
flash(message, 'info')
stats_logger.incr('successful_csv_upload')
return redirect('/tablemodelview/list/')
def is_schema_allowed(self, database, schema):