djangosnippets.org: Latest snippets tagged with 'backends'https://djangosnippets.org/tags/backends/2010-04-01T13:02:49.744453-05:00Custom db backend for statement_timeout support (postgresql_psycopg2)
2010-04-01T13:02:49.744453-05:00gonzhttps://djangosnippets.org/snippets/1973/<p>Put this in a base.py file.</p>
<p>And config this settings:</p>
<p>DATABASE_ENGINE = 'path.to.module.with.base.file'
DATABASE_STATEMENT_TIMEOUT = 60000 # milliseconds</p>
<p>(Idea from: http://www.mailinglistarchive.com/html/django-developers@googlegroups.com/2009-02/msg00024.html)</p>
Freely redistributable