Unify start/stop/restart functions of Service classes #49

Open
opened 2023-08-02 09:10:27 +03:00 by inex · 0 comments

Citing @houkime from the review of #45:

If your intention is to make all systemd service operation calls across all_services not checked, I would suggest 3 wrapper functions (for systemd_start, systemd_restart and systemd_stop) at the Service and call them instead. Maybe even remove subprocess imports from service files. This way

  • if some service is out of the line it becomes obvious
  • next time one needs to change the way services are started it is much easier.

As it is out of scope of the #45, moving it to this issue for now.

Citing @houkime from the review of #45: > If your intention is to make all systemd service operation calls across `all_services` not checked, I would suggest 3 wrapper functions (for `systemd_start`, `systemd_restart` and `systemd_stop`) at the `Service` and call them instead. Maybe even remove `subprocess` imports from service files. This way > - if some service is out of the line it becomes obvious > - next time one needs to change the way services are started it is much easier. As it is out of scope of the #45, moving it to this issue for now.
inex added the
Refactor
label 2023-08-02 09:10:27 +03:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
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: SelfPrivacy/selfprivacy-rest-api#49
There is no content yet.