Add systemd timers to run the fixes periodically #3

Closed
eSh wants to merge 2 commits from refs/pull/3/head into main
eSh commented 2022-09-18 15:10:53 +02:00 (Migrated from git.webape.site)
No description provided.
eSh commented 2022-09-18 18:12:01 +02:00 (Migrated from git.webape.site)

There's no success in controlling the systemd start/stop for user timers, though they work perfectly fine on the user level of the systemd (Thanks a lot for the hint @rokosun !)

To switch to the timers though we need to modify the fix scripts, since they store a state in the loop and to remove the loop, we need to store previous values somewhere else (for example, in the /tmp files) for them to survive between the timer ticks.

There's no success in controlling the systemd start/stop for user timers, though they work perfectly fine on the user level of the systemd (Thanks a lot for the hint @rokosun !) To switch to the timers though we need to modify the fix scripts, since they store a state in the loop and to remove the loop, we need to store previous values somewhere else (for example, in the /tmp files) for them to survive between the timer ticks.
rokosun commented 2022-09-18 20:17:00 +02:00 (Migrated from git.webape.site)

To switch to the timers though we need to modify the fix scripts, since they store a state in the loop and to remove the loop, we need to store previous values somewhere else (for example, in the /tmp files) for them to survive between the timer ticks.

Yes, but do we need to use timers for the scripts that store values between loops? For this purpose the while loop we currently use would be enough, this also means that the entire script don't have to be rerun, only the part inside the while loop needs to be rerun which makes it more efficient.

> To switch to the timers though we need to modify the fix scripts, since they store a state in the loop and to remove the loop, we need to store previous values somewhere else (for example, in the /tmp files) for them to survive between the timer ticks. Yes, but do we need to use timers for the scripts that store values between loops? For this purpose the while loop we currently use would be enough, this also means that the entire script don't have to be rerun, only the part inside the while loop needs to be rerun which makes it more efficient.
eSh commented 2022-09-18 23:53:36 +02:00 (Migrated from git.webape.site)

Yes, but do we need to use timers for the scripts that store values between loops? For this purpose the while loop we currently use would be enough, this also means that the entire script don't have to be rerun, only the part inside the while loop needs to be rerun which makes it more efficient.

True, especially after an introduction of the fix you've made for subscribing on the settings changes, the timers have no relevancy anymore. I will close this PR after the new approaches are tested enough 😉

> Yes, but do we need to use timers for the scripts that store values between loops? For this purpose the while loop we currently use would be enough, this also means that the entire script don't have to be rerun, only the part inside the while loop needs to be rerun which makes it more efficient. True, especially after an introduction of the fix you've made for subscribing on the settings changes, the timers have no relevancy anymore. I will close this PR after the new approaches are tested enough 😉

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TROMjaro/fixes-package#3
No description provided.