From owner-svn-ports-all@freebsd.org Tue Dec 8 20:21:16 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13B199D4137; Tue, 8 Dec 2015 20:21:16 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E03A715ED; Tue, 8 Dec 2015 20:21:15 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB8KLF2U038259; Tue, 8 Dec 2015 20:21:15 GMT (envelope-from rene@FreeBSD.org) Received: (from rene@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB8KLECC038255; Tue, 8 Dec 2015 20:21:14 GMT (envelope-from rene@FreeBSD.org) Message-Id: <201512082021.tB8KLECC038255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rene set sender to rene@FreeBSD.org using -f From: Rene Ladan Date: Tue, 8 Dec 2015 20:21:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r403346 - in head/databases: . py-django-transaction-hooks X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2015 20:21:16 -0000 Author: rene Date: Tue Dec 8 20:21:14 2015 New Revision: 403346 URL: https://svnweb.freebsd.org/changeset/ports/403346 Log: 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/ Added: head/databases/py-django-transaction-hooks/ head/databases/py-django-transaction-hooks/Makefile (contents, props changed) head/databases/py-django-transaction-hooks/distinfo (contents, props changed) head/databases/py-django-transaction-hooks/pkg-descr (contents, props changed) Modified: head/databases/Makefile Modified: head/databases/Makefile ============================================================================== --- head/databases/Makefile Tue Dec 8 19:45:21 2015 (r403345) +++ head/databases/Makefile Tue Dec 8 20:21:14 2015 (r403346) @@ -698,6 +698,7 @@ SUBDIR += puredb SUBDIR += pxlib SUBDIR += pxtools + SUBDIR += py-django-transaction-hooks SUBDIR += py-Elixir SUBDIR += py-MySQLdb SUBDIR += py-MySQLdb55 Added: head/databases/py-django-transaction-hooks/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/py-django-transaction-hooks/Makefile Tue Dec 8 20:21:14 2015 (r403346) @@ -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 Added: head/databases/py-django-transaction-hooks/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/py-django-transaction-hooks/distinfo Tue Dec 8 20:21:14 2015 (r403346) @@ -0,0 +1,2 @@ +SHA256 (django-transaction-hooks-0.2.tar.gz) = 51bab09547fab673a24d6c59f1df560183b3a49f24a7a5bf35e7eb34ef939e79 +SIZE (django-transaction-hooks-0.2.tar.gz) = 7527 Added: head/databases/py-django-transaction-hooks/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/py-django-transaction-hooks/pkg-descr Tue Dec 8 20:21:14 2015 (r403346) @@ -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/