Fixed typo in call, should be self.name not Task.name.

Task.name always returned None.
This commit is contained in:
Richard Chapman
2018-02-08 17:47:59 +00:00
parent 8aa829e93a
commit 632364633b
2 changed files with 3 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ class NotifyTask(Task):
elapsed_time = time.time() - self.start elapsed_time = time.time() - self.start
current_app.logger.info( current_app.logger.info(
"{task_name} took {time}".format( "{task_name} took {time}".format(
task_name=Task.name, time="{0:.4f}".format(elapsed_time) task_name=self.name, time="{0:.4f}".format(elapsed_time)
) )
) )

View File

@@ -60,6 +60,8 @@ class TaskNames(object):
class Config(object): class Config(object):
NOTIFY_LOG_LEVEL = 'DEBUG'
# URL of admin app # URL of admin app
ADMIN_BASE_URL = os.environ['ADMIN_BASE_URL'] ADMIN_BASE_URL = os.environ['ADMIN_BASE_URL']