Revision 8a8578c5 snf-astakos-app/astakos/im/project_xctx.py
b/snf-astakos-app/astakos/im/project_xctx.py | ||
---|---|---|
31 | 31 |
# interpreted as representing official policies, either expressed |
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 |
from synnefo.lib.db.xctx import TransactionHandler
|
|
34 |
from astakos.im.retry_xctx import RetryTransactionHandler
|
|
35 | 35 |
from astakos.im.notification_xctx import NotificationTransactionContext |
36 | 36 |
from astakos.im.models import sync_projects |
37 |
from astakos.im.project_error import project_error_view |
|
37 | 38 |
|
38 | 39 |
# USAGE |
39 | 40 |
# ===== |
... | ... | |
55 | 56 |
# return http response |
56 | 57 |
|
57 | 58 |
def project_transaction_context(**kwargs): |
58 |
return TransactionHandler(ctx=ProjectTransactionContext, **kwargs) |
|
59 |
return RetryTransactionHandler(ctx=ProjectTransactionContext, |
|
60 |
on_fail=project_error_view, |
|
61 |
**kwargs) |
|
59 | 62 |
|
60 | 63 |
class ProjectTransactionContext(NotificationTransactionContext): |
61 | 64 |
def __init__(self, sync=False, **kwargs): |
Also available in: Unified diff