diff options
author | rene <rene@FreeBSD.org> | 2015-12-09 04:21:14 +0800 |
---|---|---|
committer | rene <rene@FreeBSD.org> | 2015-12-09 04:21:14 +0800 |
commit | 90fa57e7ba775589f0d376bd0779c9885ea2f2c8 (patch) | |
tree | 9d4ee3be131377ae85709461e4d9fd80fee85719 /databases | |
parent | 1ae40d389f43e50c3c7f9b4ea642644bbe70886e (diff) | |
download | freebsd-ports-gnome-90fa57e7ba775589f0d376bd0779c9885ea2f2c8.tar.gz freebsd-ports-gnome-90fa57e7ba775589f0d376bd0779c9885ea2f2c8.tar.zst freebsd-ports-gnome-90fa57e7ba775589f0d376bd0779c9885ea2f2c8.zip |
A better alternative to the native transaction signals of Django.
Sometimes you need to fire off an action related to the current database
transaction, but only if the transaction successfully commits. Examples:
a Celery task, an email notification, or a cache invalidation.
Doing this correctly while accounting for savepoints that might be
individually rolled back, closed/dropped connections, and idiosyncrasies of
various databases, is non-trivial. Transaction signals just make it easier
to do it wrong.
django-transaction-hooks does the heavy lifting so you don't have to.
WWW: https://github.com/arljm/django-transaction-hooks/
Diffstat (limited to 'databases')
-rw-r--r-- | databases/Makefile | 1 | ||||
-rw-r--r-- | databases/py-django-transaction-hooks/Makefile | 22 | ||||
-rw-r--r-- | databases/py-django-transaction-hooks/distinfo | 2 | ||||
-rw-r--r-- | databases/py-django-transaction-hooks/pkg-descr | 14 |
4 files changed, 39 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile index f5e8b40debfe..e12bf2cc1e84 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -698,6 +698,7 @@ SUBDIR += puredb SUBDIR += pxlib SUBDIR += pxtools + SUBDIR += py-django-transaction-hooks SUBDIR += py-Elixir SUBDIR += py-MySQLdb SUBDIR += py-MySQLdb55 diff --git a/databases/py-django-transaction-hooks/Makefile b/databases/py-django-transaction-hooks/Makefile new file mode 100644 index 000000000000..96e2e84f37ba --- /dev/null +++ b/databases/py-django-transaction-hooks/Makefile @@ -0,0 +1,22 @@ +# Created by: René Ladan <rene@freebsd.org> +# $FreeBSD$ + +PORTNAME= django-transaction-hooks +PORTVERSION= 0.2 +CATEGORIES= databases python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= rene@freebsd.org +COMMENT= Django database backends to register transaction-commit hooks + +LICENSE= BSD3CLAUSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django>=1.6.1:${PORTSDIR}/www/py-django + +NO_ARCH= yes + +USES= python +USE_PYTHON= autoplist distutils + +.include <bsd.port.mk> diff --git a/databases/py-django-transaction-hooks/distinfo b/databases/py-django-transaction-hooks/distinfo new file mode 100644 index 000000000000..55d6ae07afbd --- /dev/null +++ b/databases/py-django-transaction-hooks/distinfo @@ -0,0 +1,2 @@ +SHA256 (django-transaction-hooks-0.2.tar.gz) = 51bab09547fab673a24d6c59f1df560183b3a49f24a7a5bf35e7eb34ef939e79 +SIZE (django-transaction-hooks-0.2.tar.gz) = 7527 diff --git a/databases/py-django-transaction-hooks/pkg-descr b/databases/py-django-transaction-hooks/pkg-descr new file mode 100644 index 000000000000..a1af20cf13ea --- /dev/null +++ b/databases/py-django-transaction-hooks/pkg-descr @@ -0,0 +1,14 @@ +A better alternative to the native transaction signals of Django. + +Sometimes you need to fire off an action related to the current database +transaction, but only if the transaction successfully commits. Examples: +a Celery task, an email notification, or a cache invalidation. + +Doing this correctly while accounting for savepoints that might be +individually rolled back, closed/dropped connections, and idiosyncrasies of +various databases, is non-trivial. Transaction signals just make it easier +to do it wrong. + +django-transaction-hooks does the heavy lifting so you don't have to. + +WWW: https://github.com/arljm/django-transaction-hooks/ |