Skip to content

Commit 937d557

Browse files
authored
Release v0.19.1 (#332)
* Release v0.19.1 * README improvements
1 parent 5a2bb93 commit 937d557

File tree

3 files changed

+32
-8
lines changed

3 files changed

+32
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Version 0.19.1
4+
5+
* Implement heartbeat with synchronous TaskTiger worker ([331](https://github.com/closeio/tasktiger/pull/331))
6+
37
## Version 0.19
48

59
* Adding synchronous (non-forking) executor ([319](https://github.com/closeio/tasktiger/pull/319), [320](https://github.com/closeio/tasktiger/pull/320))

README.rst

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@ TaskTiger
1818
Features
1919
--------
2020

21-
- Per-task fork
22-
23-
TaskTiger forks a subprocess for each task, This comes with several benefits:
24-
Memory leaks caused by tasks are avoided since the subprocess is terminated
25-
when the task is finished. A hard time limit can be set for each task, after
26-
which the task is killed if it hasn't completed. To ensure performance, any
27-
necessary Python modules can be preloaded in the parent process.
21+
- Per-task fork or synchronous worker
22+
23+
By default, TaskTiger forks a subprocess for each task, This comes with
24+
several benefits: Memory leaks caused by tasks are avoided since the
25+
subprocess is terminated when the task is finished. A hard time limit can be
26+
set for each task, after which the task is killed if it hasn't completed. To
27+
ensure performance, any necessary Python modules can be preloaded in the
28+
parent process.
29+
30+
TaskTiger also supports synchronous workers, which allows for better
31+
performance due to no forking overhead, and tasks have the ability to reuse
32+
network connections. To prevent memory leaks from accumulating, workers can
33+
be set to shutdown after a certain amount of time, at which point a
34+
supervisor can restart them. Workers also automatically exit on on hard
35+
timeouts to prevent an inconsistent process state.
2836

2937
- Unique queues
3038

@@ -552,6 +560,18 @@ Workers support the following options:
552560

553561
Store tracebacks with execution history (config defaults to ``True``).
554562

563+
- ``--executor``
564+
565+
Can be ``fork`` (default) or ``sync``. Whether to execute tasks in a separate
566+
process via fork, or execute them synchronously in the same proces. See
567+
"Features" section for the benefits of either approach.
568+
569+
- ``--exit-after``
570+
571+
Exit the worker after the time in minutes has elapsed. This is mainly useful
572+
with the synchronous executor to prevent memory leaks from accumulating.
573+
574+
555575
In some cases it is convenient to have a custom TaskTiger launch script. For
556576
example, your application may have a ``manage.py`` command that sets up the
557577
environment and you may want to launch TaskTiger workers using that script. To

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
setup(
1111
name="tasktiger",
12-
version="0.19",
12+
version="0.19.1",
1313
url="http://github.com/closeio/tasktiger",
1414
license="MIT",
1515
description="Python task queue",

0 commit comments

Comments
 (0)