michaelrsweet / pappl

PAPPL - Printer Application Framework
https://www.msweet.org/pappl
Apache License 2.0
309 stars 49 forks source link

State file not saved after printer deletion or on shutdown #75

Closed tillkamppeter closed 3 years ago

tillkamppeter commented 3 years ago

Describe the bug I have the PostScript Printer Application running with several printers defined. I delete one of them (in this example "xxx") via the appropriate button in the web interface, also click the button on the page for confirming the deletion. On the main page of the web interface I see that the printer is removed. After that I shut down the Printer Application. When starting the Printer Application again the deleted printer is back. Checking the state file after shutdown (attached) I see that the entry for the printer is still in the file, so it seems that the state of the Printer Application did not get saved right after the deletion action nor in the beginning of the shutdown procedure. The log (in debug mode, attached) also does not show any saving of the state being happened after the deletion.

To Reproduce Start the PostScript Printer Application. If there is no printer listed in the web interface create one. Then click the "Delete" button and confirm the deletion. The deleted printer does not show on the main page any more. Now shut down the Printer Application (TERM signal or shutdown subcommand). In the state file or after starting the Printer Application again you see that the deleted printer is still there.

Expected behavior State file updated so that printer actually goes away.

System Information:

Additional context

michaelrsweet commented 3 years ago

Hmm, this should be working but I'll make sure.

michaelrsweet commented 3 years ago

[master a2116a6] Save state after deleting a printer - config change (Issue #75)