Commit 7b7c0ff4 by Dudás Ádám

operations: when called, log the subject of the operation too

parent 229a55c4
...@@ -62,8 +62,9 @@ class Operation(object): ...@@ -62,8 +62,9 @@ class Operation(object):
For more information, check the synchronous call's documentation. For more information, check the synchronous call's documentation.
""" """
logger.info("%s called asynchronously with the following parameters: " logger.info("%s called asynchronously on %s with the following "
"%r", self.__class__.__name__, kwargs) "parameters: %r", self.__class__.__name__, self.subject,
kwargs)
activity = self.__prelude(kwargs) activity = self.__prelude(kwargs)
return self.async_operation.apply_async(args=(self.id, return self.async_operation.apply_async(args=(self.id,
self.subject.pk, self.subject.pk,
...@@ -84,8 +85,9 @@ class Operation(object): ...@@ -84,8 +85,9 @@ class Operation(object):
* user: The User invoking the operation. If this argument is not * user: The User invoking the operation. If this argument is not
present, it'll be provided with a default value of None. present, it'll be provided with a default value of None.
""" """
logger.info("%s called (synchronously) with the following parameters: " logger.info("%s called (synchronously) on %s with the following "
"%r", self.__class__.__name__, kwargs) "parameters: %r", self.__class__.__name__, self.subject,
kwargs)
activity = self.__prelude(kwargs) activity = self.__prelude(kwargs)
return self._exec_op(activity=activity, **kwargs) return self._exec_op(activity=activity, **kwargs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment