Skip to content

Commit

Permalink
views: fix feature flag settings.STOP_DAEMON_WHEN_VIEW_FINISHES
Browse files Browse the repository at this point in the history
This feature flag was added in

    5fc9841 ("settings: defaults: add feature flag for `LonaView.is_daemon`")

but never worked, when set globally. When the view runtime checks if a view
should be stopped, if daemonized, it uses
`settings.STOP_DAEMON_WHEN_VIEW_FINISHES` and
`View.STOP_DAEMON_WHEN_VIEW_FINISHES` as local override. Since
`View.STOP_DAEMON_WHEN_VIEW_FINISHES` was set to `True` in the base class, this
override won every time.

This patch removes `View.STOP_DAEMON_WHEN_VIEW_FINISHES`, so it becomes an
optional override, for `settings.STOP_DAEMON_WHEN_VIEW_FINISHES`.

Signed-off-by: Florian Scherf <mail@florianscherf.de>
  • Loading branch information
fscherf committed Feb 10, 2023
1 parent 694a43d commit 9254e2e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lona/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

class View:
STATIC_FILES: list[StaticFile] = []
STOP_DAEMON_WHEN_VIEW_FINISHES = True # TODO: remove in 2.0

def __init__(
self,
Expand Down

0 comments on commit 9254e2e

Please sign in to comment.