mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-23 08:18:12 +08:00
consistent task name formatting
This commit is contained in:
+2
-2
@@ -57,12 +57,12 @@ def call_hook(sender, instance, **kwargs):
|
||||
m = importlib.import_module(module)
|
||||
f = getattr(m, func)
|
||||
except (ValueError, ImportError, AttributeError):
|
||||
logger.error(_('malformed return hook \'{}\' for {}').format(instance.hook, instance.name))
|
||||
logger.error(_('malformed return hook \'{}\' for [{}]').format(instance.hook, instance.name))
|
||||
return
|
||||
try:
|
||||
f(instance)
|
||||
except Exception as e:
|
||||
logger.error(_('return hook {} failed on {} because {}').format(instance.hook, instance.name, e))
|
||||
logger.error(_('return hook {} failed on [{}] because {}').format(instance.hook, instance.name, e))
|
||||
|
||||
|
||||
class SuccessManager(models.Manager):
|
||||
|
||||
Reference in New Issue
Block a user