Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
859cc57b
authored
Apr 03, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: log calls to operations
parent
01328670
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
circle/common/operations.py
+9
-0
No files found.
circle/common/operations.py
View file @
859cc57b
from
logging
import
getLogger
from
.models
import
activity_context
from
.models
import
activity_context
from
django.core.exceptions
import
PermissionDenied
from
django.core.exceptions
import
PermissionDenied
logger
=
getLogger
(
__name__
)
class
Operation
(
object
):
class
Operation
(
object
):
"""Base class for VM operations.
"""Base class for VM operations.
"""
"""
...
@@ -56,6 +61,8 @@ class Operation(object):
...
@@ -56,6 +61,8 @@ 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: "
"
%
r"
,
self
.
__class__
.
__name__
,
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
,
...
@@ -76,6 +83,8 @@ class Operation(object):
...
@@ -76,6 +83,8 @@ 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: "
"
%
r"
,
self
.
__class__
.
__name__
,
kwargs
)
activity
=
self
.
__prelude
(
kwargs
)
activity
=
self
.
__prelude
(
kwargs
)
return
self
.
_exec_op
(
activity
=
activity
,
**
kwargs
)
return
self
.
_exec_op
(
activity
=
activity
,
**
kwargs
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment