delfick / photons

Python3.6+ asyncio framework for interacting with LIFX devices
https://photons.delfick.com
MIT License
73 stars 6 forks source link

[interactor] Better graceful shutdown #42

Closed delfick closed 3 years ago

delfick commented 3 years ago

fixes #41

Though I'm gonna think about this some more, what I have here works but I think I can make this better

And I need unit tests and to play with it some more and also I'm changing core photons here

Djelibeybi commented 3 years ago

Is the idea to still send a SIGTERM to the running process, just handle it better? Because I don't see a way to trigger the shutdown from a Interactor command.

delfick commented 3 years ago

ah, yes, I should add that too.

But yes, I want to make sigterm actually be graceful, cause currently it very much isn't

This file will never be done lol : https://github.com/delfick/photons/commits/main/modules/photons_app/runner.py https://github.com/delfick/photons/commits/fcd7466c5ae29335e0675ac69559001b9adcf365/photons_app/runner.py

It's very complicated.

I have an idea I'll start working on to make it better though.

Djelibeybi commented 3 years ago

I’m glad you think it’s complicated too 😁

delfick commented 3 years ago

hehhehehe

delfick commented 3 years ago

Fixed better in #48