From 48732ff31f5f0ecbd66bd551fda6f3f4deb29587 Mon Sep 17 00:00:00 2001 From: Rene Ladan Date: Tue, 8 Dec 2015 20:21:14 +0000 Subject: 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/ --- databases/py-django-transaction-hooks/Makefile | 22 ++++++++++++++++++++++ databases/py-django-transaction-hooks/distinfo | 2 ++ databases/py-django-transaction-hooks/pkg-descr | 14 ++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 databases/py-django-transaction-hooks/Makefile create mode 100644 databases/py-django-transaction-hooks/distinfo create mode 100644 databases/py-django-transaction-hooks/pkg-descr (limited to 'databases/py-django-transaction-hooks') 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 +# $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 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/ -- cgit v1.2.3