mvo5 / unattended-upgrades

Automatic installation of security upgrades on apt based systems
GNU General Public License v2.0
286 stars 77 forks source link

unattended-upgrade: add CM for toggling process priority #314

Closed jgomo3 closed 2 years ago

jgomo3 commented 2 years ago

Add a context manager for wrapping code that would benefit with a different process execution priority, only during that block of code execution.

It is done in response of a suggestion in the code itself to wrap some logic in such a context manager.

Then that logic is wrapped in it.

Notice:

Hello @mvo5 . I'm not expecting this PR to be actually accepted at first, I know I haven't wrote tests and I haven't tested it thoroughly. But I found this a good way to communicate with you the idea. Also, I would like to contribute the best I can, just that I would like some pointers on what process do you want me to follow.

I expect that I could iterate over this PR and eventually have a conclusion on this issue.

Thank you for your awesome work.