diff options
Diffstat (limited to 'bin/reproducible_db_maintenance.py')
-rwxr-xr-x | bin/reproducible_db_maintenance.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/reproducible_db_maintenance.py b/bin/reproducible_db_maintenance.py index b2947384..8b802200 100755 --- a/bin/reproducible_db_maintenance.py +++ b/bin/reproducible_db_maintenance.py @@ -13,7 +13,7 @@ from reproducible_common import * -now = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S") +now = datetime.now().strftime("%Y-%m-%d-%H-%M-%S") # the original schema is here @@ -420,12 +420,12 @@ def db_update(): log.info('Found schema updates.') for update in range(current+1, last+1): log.info('Applying database update #' + str(update) + '. Queries:') - startTime = datetime.datetime.now() + startTime = datetime.now() for query in schema_updates[update]: log.info('\t' + query) query_db(query) log.info(str(len(schema_updates[update])) + ' queries executed in ' + - str(datetime.datetime.now() - startTime)) + str(datetime.now() - startTime)) return True @@ -440,7 +440,7 @@ if __name__ == '__main__': changed_created = db_create_tables() changed = db_update() if changed or changed_created: - log.info('Total execution time: ' + str(datetime.datetime.now() - - datetime.datetime.strptime(now, "%Y-%m-%d-%H-%M-%S"))) + log.info('Total execution time: ' + str(datetime.now() - + datetime.strptime(now, "%Y-%m-%d-%H-%M-%S"))) else: log.info('No pending updates.') |