Skip to content

IsDaemon.save_state could be more robust #8

@untzag

Description

@untzag
  • save_state triggers only when a setter of state is called (consult the State class and it's updated property). This trigger will not be set if an element of a list in state is altered (e.g. self._state["my_list"][3] = val").
  • save_state could be incorporated in the IsDaemon.close method, to ensure state is saved at shutdown

I would do it in shutdown, not close (because many daemons that have a close do not call super because it is a no-op)

We actually do explicitly save the state in shutdown_all, but that is only used on POSIX systems, not windows...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions