- Pass args to click from Daemon.cli()
- Don't run start hook on reload or when the daemon is already running
- Minor tweaks to some undocumented experimental features
- Dropped support for Python 2.7 and 3.5 (only >= 3.6 is now supported)
- Deprecated
shutdown_callback
argument in favor of new hooks system. Replaceshutdown_callback=func
withhooks={'shutdown': func}
. - Added
'start'
hook that gets called before attempting to start the daemon. This can be useful for checking things or setting things up. - Improvements to some undocumented experimental features. :)
- The
stop
action will now clean up the PID file if the worker didn't do it for some reason. - A few bug fixes to some undocumented experimental features. :)
- Official support for Python 3.9
- Added back official support for Python 3.5
- Increased test coverage to over 95%.
- All tests now pass on macOS (Intel) and the GitHub Actions build now runs on macOS 10.15 in addition to Ubuntu.
- Fixed the
close_open_files
option to be much more reliable and consistent across different platforms. - Fixed a race condition with the self-reload functionality where the PID file of the parent process was being deleted while the child process was trying to read it.
- Added
stdout_file
andstderr_file
arguments toDaemon
. If these arguments are provided whendetach=True
, STDOUT and STDERR will be redirected to these files. In non-detached mode, these arguments are ignored. - When
chrootdir
is given, all other paths are now always considered relative to the chroot directory, even with a leading slash. - Actions can now take arbitrary arguments, and (on Python 3) CLI options are auto-generated from the function signature. The auto-generated CLI options work best when your action's function signature contains type annotations and default values where applicable.
- Added
timeout
andforce
arguments to the built-instop
action, accessible from the CLI as--timeout
and--force
. - Added
json
andfields
arguments to the built-instatus
action, accessible from the CLI as--json
and--fields
. - Added colored output when the output stream is attached to a terminal.
- Fixed a bug where the daemon wouldn't respond properly to
docker stop
when running in a docker container. - The worker function can now be a method called
worker
on aDaemon
subclass. - Some more secret experimental stuff. :)
- Official support for Python 2.7, 3.6, 3.7, and 3.8.
- Fixed bug checking if a stream is a socket on Python 3.8.
- Closing open files is now more efficient on systems with a very high limit on the number of open files.
- Improved detection of running inside a container.
- No changes in this release. Bumped version only to re-upload to PyPI.
- Added official support for Python 2.7, 3.3, 3.4, and 3.5.
- Added a comprehensive suite of unit tests with over 90% code coverage.
- Dependencies (click and psutil) are no longer pinned to specific versions.
- Fixed bug with
atexit
handlers not being called in intermediate processes. - Fixed bug when PID file is a relative path.
- Fixed bug when STDIN doesn't have a file descriptor number.
- Fixed bug when running in non-detached mode in a Docker container.
- A TTY is no longer checked for when deciding how to run in non-detached mode. The behavior was inconsistent across different platforms.
- Fixed bug when a process stopped before having chance to check if it stopped.
- Fixed bug where an exception could be raised if a PID file is already gone when trying to remove it.
- Subdirectories created for PID files now respect the
umask
setting. - The pre-
umask
mode for PID files is now0o666
instead of0o777
, which will result in a default mode of0o644
instead of0o755
when using the defaultumask
of0o22
.
- Upgraded click to version 2.5.
- Status action now returns exit code 1 if the daemon is not running.
- Fixed bug that was causing an empty PID file on Python 3.
- Upgraded click to version 2.1.
- Open file discriptors are no longer closed by default. This functionality is now optional via the
close_open_files
argument toDaemon()
. - Added
is_worker
argument toDaemonCLI()
as well as thepass_daemon
decorator.
- Upgraded click to version 2.0.
- Fixed literal octal formatting to work with Python 3.
- Fixed bug with uptime calculation in status action.
- Upgraded click to version 0.7.
- Reorganized package and cleaned up code.
- Renamed
Daemon.get_actions()
toDaemon.list_actions()
. - Improvements to documentation.
- Fixed bug with non-detached mode when parent is in the same process group.
- Initial release.