<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/rq.git/tests/test_connection.py, branch python3.8</title>
<subtitle>github.com: nvie/rq.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/'/>
<entry>
<title>Fixes Job.fetch when return value is unpickleable (#1184)</title>
<updated>2020-01-31T12:28:32+00:00</updated>
<author>
<name>Selwin Ong</name>
<email>selwin.ong@gmail.com</email>
</author>
<published>2020-01-31T12:28:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=fda4b35f4667cebada1a541b141707aa63b19c4f'/>
<id>fda4b35f4667cebada1a541b141707aa63b19c4f</id>
<content type='text'>
* Fixes Job.fetch when return value is unpickleable

* Fixed connection test in newer versions of Redis
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Fixes Job.fetch when return value is unpickleable

* Fixed connection test in newer versions of Redis
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed #870 Improved test coverage for connections.py and utils.py</title>
<updated>2017-08-31T11:23:17+00:00</updated>
<author>
<name>Theo</name>
<email>theo.despoudis@teckro.com</email>
</author>
<published>2017-08-31T11:23:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=ee64114e6ef8541c844aeae8e9f28d20751b49da'/>
<id>ee64114e6ef8541c844aeae8e9f28d20751b49da</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix tests</title>
<updated>2015-11-09T04:34:27+00:00</updated>
<author>
<name>ahxxm</name>
<email>i@ahxxm.com</email>
</author>
<published>2015-11-09T04:34:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=b06f112cb0a2087e9ee79eb25761bcf5f6327176'/>
<id>b06f112cb0a2087e9ee79eb25761bcf5f6327176</id>
<content type='text'>
syntax: assertEquals -&gt; assertEqual, assertNotEquals -&gt; assertNotEqual
usage: status of worker and job now will use get/set method instead of property method
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
syntax: assertEquals -&gt; assertEqual, assertNotEquals -&gt; assertNotEqual
usage: status of worker and job now will use get/set method instead of property method
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable the most modern Python syntax.</title>
<updated>2014-05-05T08:50:02+00:00</updated>
<author>
<name>Vincent Driessen</name>
<email>vincent@3rdcloud.com</email>
</author>
<published>2014-05-05T08:49:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=38ec259b6e436d7868af8e99d55305340d5375ce'/>
<id>38ec259b6e436d7868af8e99d55305340d5375ce</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>New connection management.</title>
<updated>2012-03-23T14:10:49+00:00</updated>
<author>
<name>Vincent Driessen</name>
<email>vincent@3rdcloud.com</email>
</author>
<published>2012-03-23T13:33:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=2982486448412b336f6712defde5e73cf489f3bc'/>
<id>2982486448412b336f6712defde5e73cf489f3bc</id>
<content type='text'>
Connections can now be set explicitly on Queues, Workers, and Jobs.
Jobs that are implicitly created by Queue or Worker API calls now
inherit the connection of their creator's.

For all RQ object instances that are created now holds that the
"current" connection is used if none is passed in explicitly.  The
"current" connection is thus hold on to at creation time and won't be
changed for the lifetime of the object.

Effectively, this means that, given a default Redis connection, say you
create a queue Q1, then push another Redis connection onto the
connection stack, then create Q2. In that case, Q1 means a queue on the
first connection and Q2 on the second connection.

This is way more clear than it used to be.

Also, I've removed the `use_redis()` call, which was named ugly.
Instead, some new alternatives for connection management now exist.

You can push/pop connections now:

    &gt;&gt;&gt; my_conn = Redis()
    &gt;&gt;&gt; push_connection(my_conn)
    &gt;&gt;&gt; q = Queue()
    &gt;&gt;&gt; q.connection == my_conn
    True
    &gt;&gt;&gt; pop_connection() == my_conn

Also, you can stack them syntactically:

    &gt;&gt;&gt; conn1 = Redis()
    &gt;&gt;&gt; conn2 = Redis('example.org', 1234)
    &gt;&gt;&gt; with Connection(conn1):
    ...     q = Queue()
    ...     with Connection(conn2):
    ...         q2 = Queue()
    ...     q3 = Queue()
    &gt;&gt;&gt; q.connection == conn1
    True
    &gt;&gt;&gt; q2.connection == conn2
    True
    &gt;&gt;&gt; q3.connection == conn1
    True

Or, if you only require a single connection to Redis (for most uses):

    &gt;&gt;&gt; use_connection(Redis())
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Connections can now be set explicitly on Queues, Workers, and Jobs.
Jobs that are implicitly created by Queue or Worker API calls now
inherit the connection of their creator's.

For all RQ object instances that are created now holds that the
"current" connection is used if none is passed in explicitly.  The
"current" connection is thus hold on to at creation time and won't be
changed for the lifetime of the object.

Effectively, this means that, given a default Redis connection, say you
create a queue Q1, then push another Redis connection onto the
connection stack, then create Q2. In that case, Q1 means a queue on the
first connection and Q2 on the second connection.

This is way more clear than it used to be.

Also, I've removed the `use_redis()` call, which was named ugly.
Instead, some new alternatives for connection management now exist.

You can push/pop connections now:

    &gt;&gt;&gt; my_conn = Redis()
    &gt;&gt;&gt; push_connection(my_conn)
    &gt;&gt;&gt; q = Queue()
    &gt;&gt;&gt; q.connection == my_conn
    True
    &gt;&gt;&gt; pop_connection() == my_conn

Also, you can stack them syntactically:

    &gt;&gt;&gt; conn1 = Redis()
    &gt;&gt;&gt; conn2 = Redis('example.org', 1234)
    &gt;&gt;&gt; with Connection(conn1):
    ...     q = Queue()
    ...     with Connection(conn2):
    ...         q2 = Queue()
    ...     q3 = Queue()
    &gt;&gt;&gt; q.connection == conn1
    True
    &gt;&gt;&gt; q2.connection == conn2
    True
    &gt;&gt;&gt; q3.connection == conn1
    True

Or, if you only require a single connection to Redis (for most uses):

    &gt;&gt;&gt; use_connection(Redis())
</pre>
</div>
</content>
</entry>
</feed>
