<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/rq.git/tests/test_worker.py, branch wait-for-processing-unit</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>New dequeue strategy (#1806)</title>
<updated>2023-03-04T23:23:00+00:00</updated>
<author>
<name>lowercase00</name>
<email>21188280+lowercase00@users.noreply.github.com</email>
</author>
<published>2023-03-04T23:23:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=654649743c8582eb1017e45d12aa315965a901a9'/>
<id>654649743c8582eb1017e45d12aa315965a901a9</id>
<content type='text'>
* New dequeue strategy

This implements a new parameter `dequeue_strategy` that
should replace the `RoundRobinWorker` and `RandomWorker`.
Changes includes: feature, docs, tests, deprecation warning.

* Fix dequeue strategy name

* Black &amp; Fix warning

* feat: tests, warnings, refactor naming

* feat: improve worker check

* fix: revert to str subclass

* fix: dequeue strategy into bootstrap

* org: move DequeueStrategy to worker

* refactor: round robin naming

* fix: naming

* fix: type annotation

* fix: typo

* refactor: remove kwarg from worker's init

* fix: typo

* move `dequeue_strategy` from `bootstrap()` into `work()`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* New dequeue strategy

This implements a new parameter `dequeue_strategy` that
should replace the `RoundRobinWorker` and `RandomWorker`.
Changes includes: feature, docs, tests, deprecation warning.

* Fix dequeue strategy name

* Black &amp; Fix warning

* feat: tests, warnings, refactor naming

* feat: improve worker check

* fix: revert to str subclass

* fix: dequeue strategy into bootstrap

* org: move DequeueStrategy to worker

* refactor: round robin naming

* fix: naming

* fix: type annotation

* fix: typo

* refactor: remove kwarg from worker's init

* fix: typo

* move `dequeue_strategy` from `bootstrap()` into `work()`</pre>
</div>
</content>
</entry>
<entry>
<title>Worker - max_idle_time feature (#1795)</title>
<updated>2023-02-21T23:35:43+00:00</updated>
<author>
<name>Rony Lutsky</name>
<email>3050627+ronlut@users.noreply.github.com</email>
</author>
<published>2023-02-21T23:35:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=aedc9b9e06abc26417cd71e842266c4ae5c658b6'/>
<id>aedc9b9e06abc26417cd71e842266c4ae5c658b6</id>
<content type='text'>
* fix accessing None when dequeued result is None (burst=True, or timeout=None)

* add a test

* implement + tests

* fix if

* adjust test

* merge

* test

* test

* merge master

* take max_idle_time into account for dequeue_timeout

* refactor a bit

* potential bug fix

* tests

* math.ceil

* buffer tests</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fix accessing None when dequeued result is None (burst=True, or timeout=None)

* add a test

* implement + tests

* fix if

* adjust test

* merge

* test

* test

* merge master

* take max_idle_time into account for dequeue_timeout

* refactor a bit

* potential bug fix

* tests

* math.ceil

* buffer tests</pre>
</div>
</content>
</entry>
<entry>
<title>Configurable maintenance task interval (#1823)</title>
<updated>2023-02-21T23:14:32+00:00</updated>
<author>
<name>Rony Lutsky</name>
<email>3050627+ronlut@users.noreply.github.com</email>
</author>
<published>2023-02-21T23:14:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=41406db3ebd287ab1aa8885948140ec63f22d88a'/>
<id>41406db3ebd287ab1aa8885948140ec63f22d88a</id>
<content type='text'>
* Configurable maintenance task interval

* pass to worker

* rename parameter

* rename

* rename

* test</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Configurable maintenance task interval

* pass to worker

* rename parameter

* rename

* rename

* test</pre>
</div>
</content>
</entry>
<entry>
<title>Enhance worker termination logic (#1729)</title>
<updated>2023-02-16T23:42:41+00:00</updated>
<author>
<name>Rony Lutsky</name>
<email>3050627+ronlut@users.noreply.github.com</email>
</author>
<published>2023-02-16T23:42:41+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=bba781d288dd846781d449f343058c4d5cdd94ab'/>
<id>bba781d288dd846781d449f343058c4d5cdd94ab</id>
<content type='text'>
* enhance worker termination logic and allow passing custom exc_info in failure callback

* handle ret_val None

* fix unbound variable

* typing

* docs

* Update exceptions.md

* rename

* typing

* rename

* Update exceptions.md

* revert test change</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* enhance worker termination logic and allow passing custom exc_info in failure callback

* handle ret_val None

* fix unbound variable

* typing

* docs

* Update exceptions.md

* rename

* typing

* rename

* Update exceptions.md

* revert test change</pre>
</div>
</content>
</entry>
<entry>
<title>Fix - Use worker TTL for timeout (#1794)</title>
<updated>2023-02-10T00:26:03+00:00</updated>
<author>
<name>Rony Lutsky</name>
<email>ronlut@gmail.com</email>
</author>
<published>2023-02-10T00:26:03+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=b69ee10cbba78789e48ce44fa69f14715d94b7a5'/>
<id>b69ee10cbba78789e48ce44fa69f14715d94b7a5</id>
<content type='text'>
* Use worker TTL for timeout

* add test

* renames

* test

* use dequeue_timeout</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use worker TTL for timeout

* add test

* renames

* test

* use dequeue_timeout</pre>
</div>
</content>
</entry>
<entry>
<title>Fix - TypeError - accessing None when dequeued result is None (when timeout=None, e.g. in burst mode) (#1793)</title>
<updated>2023-02-05T10:41:56+00:00</updated>
<author>
<name>Rony Lutsky</name>
<email>ronlut@gmail.com</email>
</author>
<published>2023-02-05T10:41:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=54db2fa8d1af221485870ddf7c5707cd704c73c7'/>
<id>54db2fa8d1af221485870ddf7c5707cd704c73c7</id>
<content type='text'>
* fix accessing None when dequeued result is None (burst=True, or timeout=None)

* add a test

* pr fix

* fix tests</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fix accessing None when dequeued result is None (burst=True, or timeout=None)

* add a test

* pr fix

* fix tests</pre>
</div>
</content>
</entry>
<entry>
<title>Enhanced Redis Connection Reliability (#1753)</title>
<updated>2023-02-02T03:53:19+00:00</updated>
<author>
<name>lowercase00</name>
<email>21188280+lowercase00@users.noreply.github.com</email>
</author>
<published>2023-02-02T03:53:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=c2e6d953383bfe678c3ad13e4359e27f5feaba41'/>
<id>c2e6d953383bfe678c3ad13e4359e27f5feaba41</id>
<content type='text'>
* Enhanced Redis Connection Reliability

The Redis connection may fail for several reasons. As the connection can be
(1) explicitly passed to the worker or (2) implicity set, this will improve the
Connection configuration by setting a timeout to the socket, and adding
an ExponentialBackoff Retry logic.

* Simpler Connection logic

* Add simple retry logic to Redis Connection Error

* Make retry exponential, add keepalive &amp; socket_connect_timeout

* Handles configuration on Redis' connection pool

* Simplifies timeout exception logic

* Fix burst bug, add test

* Add docs related to `socket_timeout`, improve compatibility with older RedisPy versions

* Fixes

* New timeout private method

* Fix timeout</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Enhanced Redis Connection Reliability

The Redis connection may fail for several reasons. As the connection can be
(1) explicitly passed to the worker or (2) implicity set, this will improve the
Connection configuration by setting a timeout to the socket, and adding
an ExponentialBackoff Retry logic.

* Simpler Connection logic

* Add simple retry logic to Redis Connection Error

* Make retry exponential, add keepalive &amp; socket_connect_timeout

* Handles configuration on Redis' connection pool

* Simplifies timeout exception logic

* Fix burst bug, add test

* Add docs related to `socket_timeout`, improve compatibility with older RedisPy versions

* Fixes

* New timeout private method

* Fix timeout</pre>
</div>
</content>
</entry>
<entry>
<title>Remove compatibility layer for &lt; 3.5 (#1761)</title>
<updated>2023-01-26T06:04:17+00:00</updated>
<author>
<name>lowercase00</name>
<email>21188280+lowercase00@users.noreply.github.com</email>
</author>
<published>2023-01-26T06:04:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=6813e5a2bafda0328fcee8a1c24f084e465accc8'/>
<id>6813e5a2bafda0328fcee8a1c24f084e465accc8</id>
<content type='text'>
* Remove unused code from compat module

* Remove unused dictconfig

* Remove total_ordering compat layer

* Remove compatibility layer

This completely removes the compat module. It moves utilities
functions (`as_text` and `decode_redis_hash`) to the `utils`
module, is eliminates the use of the proxies `text_type` and
`string_types`, using the `str` construct directly.

* Remove compat module

Finishes the cleaning of the compatibility module.
The last function being the `is_python_version` function
which was being used internally.

* Fix old import

* Fix Imports

* Remove Dummy (Force GH Actions)

* Fix Imports

* Organize Imports</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Remove unused code from compat module

* Remove unused dictconfig

* Remove total_ordering compat layer

* Remove compatibility layer

This completely removes the compat module. It moves utilities
functions (`as_text` and `decode_redis_hash`) to the `utils`
module, is eliminates the use of the proxies `text_type` and
`string_types`, using the `str` construct directly.

* Remove compat module

Finishes the cleaning of the compatibility module.
The last function being the `is_python_version` function
which was being used internally.

* Fix old import

* Fix Imports

* Remove Dummy (Force GH Actions)

* Fix Imports

* Organize Imports</pre>
</div>
</content>
</entry>
<entry>
<title>Persist worker_name after job is finished (#1730)</title>
<updated>2022-11-26T03:37:27+00:00</updated>
<author>
<name>eswolinsky3241</name>
<email>58117461+eswolinsky3241@users.noreply.github.com</email>
</author>
<published>2022-11-26T03:37:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=511971691166b6ba9be476cd872416901ad480c3'/>
<id>511971691166b6ba9be476cd872416901ad480c3</id>
<content type='text'>
* Persist worker_name after job is finished

Persisting the worker_name on the job object in Redis would allow for debugging and
analyzing logs from the worker

* Remove redundent job.save() method call

* Remove check for null worker

Now that worker name is persisted after job finishes or fails,
no need to assert that worker name is None

* Change github runner to Ubuntu 20.04

* Change github runner to Ubuntu 20.04</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Persist worker_name after job is finished

Persisting the worker_name on the job object in Redis would allow for debugging and
analyzing logs from the worker

* Remove redundent job.save() method call

* Remove check for null worker

Now that worker name is persisted after job finishes or fails,
no need to assert that worker name is None

* Change github runner to Ubuntu 20.04

* Change github runner to Ubuntu 20.04</pre>
</div>
</content>
</entry>
<entry>
<title>Multiple results using Redis Streams (#1725)</title>
<updated>2022-11-19T08:17:35+00:00</updated>
<author>
<name>Selwin Ong</name>
<email>selwin.ong@gmail.com</email>
</author>
<published>2022-11-19T08:17:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/rq.git/commit/?id=0691b4d46eb721b5fb5395a03fd770db7e1651f4'/>
<id>0691b4d46eb721b5fb5395a03fd770db7e1651f4</id>
<content type='text'>
* WIP job results

* Result can now be saved

* Successfully saved and restored result

* result.save() should accept pipeline

* Successful results are saved

* Failures are now saved properly too.

* Added test for Result.get_latest()

* Checkpoint

* Got Result.all() to work

* Added Result.count(), Result.delete()

* Backward compatibility for job.result and job.exc_info

* Added some typing

* More typing stuff

* Fixed typing in job.py

* More typing updates

* Only keep the last 10 results

* Documented job.results()

* Got results test to pass

* Don't run test_results.py on Redis server &lt; 5.0

* Fixed mock import on some Python versions

* Remove Redis 3 from test matrix

* Jobs should never use the new Result implementation if server is &lt; 5.0

* Results should only be created is Redis stream is supported.

* Added back Redis 3 to test matrix

* Fixed job.supports_redis_streams

* Fixed worker test

* Updated docs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* WIP job results

* Result can now be saved

* Successfully saved and restored result

* result.save() should accept pipeline

* Successful results are saved

* Failures are now saved properly too.

* Added test for Result.get_latest()

* Checkpoint

* Got Result.all() to work

* Added Result.count(), Result.delete()

* Backward compatibility for job.result and job.exc_info

* Added some typing

* More typing stuff

* Fixed typing in job.py

* More typing updates

* Only keep the last 10 results

* Documented job.results()

* Got results test to pass

* Don't run test_results.py on Redis server &lt; 5.0

* Fixed mock import on some Python versions

* Remove Redis 3 from test matrix

* Jobs should never use the new Result implementation if server is &lt; 5.0

* Results should only be created is Redis stream is supported.

* Added back Redis 3 to test matrix

* Fixed job.supports_redis_streams

* Fixed worker test

* Updated docs.</pre>
</div>
</content>
</entry>
</feed>
