Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.19.1 #332

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Version 0.19.1

* Implement heartbeat with synchronous TaskTiger worker ([331](https://github.com/closeio/tasktiger/pull/331))

## Version 0.19

* Adding synchronous (non-forking) executor ([319](https://github.com/closeio/tasktiger/pull/319), [320](https://github.com/closeio/tasktiger/pull/320))
Expand Down
34 changes: 27 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@ TaskTiger
Features
--------

- Per-task fork

TaskTiger forks a subprocess for each task, This comes with several benefits:
Memory leaks caused by tasks are avoided since the subprocess is terminated
when the task is finished. A hard time limit can be set for each task, after
which the task is killed if it hasn't completed. To ensure performance, any
necessary Python modules can be preloaded in the parent process.
- Per-task fork or synchronous worker

By default, TaskTiger forks a subprocess for each task, This comes with
several benefits: Memory leaks caused by tasks are avoided since the
subprocess is terminated when the task is finished. A hard time limit can be
set for each task, after which the task is killed if it hasn't completed. To
ensure performance, any necessary Python modules can be preloaded in the
parent process.

TaskTiger also supports synchronous workers, which allows for better
performance due to no forking overhead, and tasks have the ability to reuse
network connections. To prevent memory leaks from accumulating, workers can
be set to shutdown after a certain amount of time, at which point a
supervisor can restart them. Workers also automatically exit on on hard
timeouts to prevent an inconsistent process state.

- Unique queues

Expand Down Expand Up @@ -552,6 +560,18 @@ Workers support the following options:

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

- ``--executor``

Can be ``fork`` (default) or ``sync``. Whether to execute tasks in a separate
process via fork, or execute them synchronously in the same proces. See
"Features" section for the benefits of either approach.

- ``--exit-after``

Exit the worker after the time in minutes has elapsed. This is mainly useful
with the synchronous executor to prevent memory leaks from accumulating.


In some cases it is convenient to have a custom TaskTiger launch script. For
example, your application may have a ``manage.py`` command that sets up the
environment and you may want to launch TaskTiger workers using that script. To
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="tasktiger",
version="0.19",
version="0.19.1",
url="http://github.com/closeio/tasktiger",
license="MIT",
description="Python task queue",
Expand Down
Loading