Change go-sbot.service name to be configurable #113

Merged
notplants merged 19 commits from go-sbot-service into main 2022-06-15 12:03:34 +00:00
Owner

This PR changes the name of go-sbot.service to be configurable, using go-sbot.service as the default.

This is possibly unnecessary but is the only thing to my knowledge which would prevent a yunohost installation with multiple instances installed on the same machine (admittedly I mightly partly succumbing to yunohost gamification here, where if you pass all the criteria, including multi-install, your applications gets a higher level... I am a sucker for points... but maybe this is a small change...)

This PR changes the name of go-sbot.service to be configurable, using go-sbot.service as the default. This is possibly unnecessary but is the only thing to my knowledge which would prevent a yunohost installation with multiple instances installed on the same machine (admittedly I mightly partly succumbing to yunohost gamification here, where if you pass all the criteria, including multi-install, your applications gets a higher level... I am a sucker for points... but maybe this is a small change...)
notplants added 2 commits 2022-05-20 11:38:49 +00:00
continuous-integration/drone/pr Build is passing Details
7deaa00d6e
Fix hardcoded path
continuous-integration/drone/pr Build is passing Details
56c142a387
Make go-sbot.service name configurable
notplants requested review from glyph 2022-05-20 11:39:00 +00:00
notplants added 1 commit 2022-05-20 11:57:35 +00:00
continuous-integration/drone/pr Build is passing Details
6434471599
Bump version numbers
notplants added 2 commits 2022-05-20 14:33:22 +00:00
continuous-integration/drone/pr Build was killed Details
543470b949
Fix lockfile
continuous-integration/drone/pr Build was killed Details
92f516b161
Merge pull request 'Fix lockfile' (#114) from fix-lock into go-sbot-service
Reviewed-on: #114
notplants added 2 commits 2022-05-25 10:27:22 +00:00
notplants added 2 commits 2022-05-26 21:19:43 +00:00
glyph requested changes 2022-06-08 07:37:24 +00:00
glyph left a comment
Owner

Looks good! I just left a single comment about module / function imports.

Seems like there's a small merge conflict to resolve and then you're good to go.

Looks good! I just left a single comment about module / function imports. Seems like there's a small merge conflict to resolve and then you're good to go.
@ -68,3 +68,3 @@
let info_output = Command::new("systemctl")
.arg("show")
.arg("go-sbot.service")
.arg(get_config_value("GO_SBOT_SERVICE")?)
Owner

One suggestion I have is to reference the module when calling the function (ie. to not import all the way down to the function level):

use crate::config_manager;

let info_output = Command::new("systemctl")
	.arg("show")
	.arg(config_manager::get_config_value("GO_SBOT_SERVICE")?)

The result is more verbose and not as pretty and clean, but it helps to communicate where this get_config_value function is defined. This has saved me a lot of time in the past when I'm trying to follow the code and find functions: "Does this function live in this file or somewhere else?". It's also the idiomatic way for Rust.

One suggestion I have is to reference the module when calling the function (ie. to not import all the way down to the function level): ```rust use crate::config_manager; let info_output = Command::new("systemctl") .arg("show") .arg(config_manager::get_config_value("GO_SBOT_SERVICE")?) ``` The result is more verbose and not as pretty and clean, but it helps to communicate where this `get_config_value` function is defined. This has saved me a lot of time in the past when I'm trying to follow the code and find functions: "Does this function live in this file or somewhere else?". It's also the idiomatic way for Rust.
Author
Owner

cool I updated all the get_config_value I could find to use this form

cool I updated all the get_config_value I could find to use this form
notplants added 6 commits 2022-06-15 10:47:46 +00:00
continuous-integration/drone/pr Build is failing Details
21fb29c322
Working sbot
continuous-integration/drone/pr Build is failing Details
9f6ba14123
Cargo fmt
continuous-integration/drone/pr Build is failing Details
cdcff3475c
Fix cargo.lock
notplants added 2 commits 2022-06-15 11:34:12 +00:00
continuous-integration/drone/pr Build is failing Details
9c6fa00ec7
Fix cargo.lock
notplants added 1 commit 2022-06-15 11:37:43 +00:00
continuous-integration/drone/pr Build is failing Details
5838faf128
Cargo fmt
notplants added 1 commit 2022-06-15 11:46:59 +00:00
continuous-integration/drone/pr Build is passing Details
87ad2439b9
Fix cargo fmt
Author
Owner

Green checkmark, merging this in.

Green checkmark, merging this in.
notplants merged commit 6b34864289 into main 2022-06-15 12:03:34 +00:00
Sign in to join this conversation.
No description provided.