Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config to db #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Config to db #8

wants to merge 3 commits into from

Conversation

kivilahtio
Copy link
Contributor

No description provided.

 be present. example.com is a nicer example.

If one accidentally forgets to change the default URL, like I did, then it unnecessarily spams atlassian.net
example.com is a convention used to prevent this.
Otherwise the password and username, which could be securely inserted via STDIN on daemon start
are persisted on the config file.
@kivilahtio
Copy link
Contributor Author

I havent tested with SQL at all, since I have no need to support that. I provided filler SQL functions which might be more or less what is needed.

@mkobaly
Copy link
Owner

mkobaly commented Dec 14, 2021

I wonder if this is beneficial to store in the database since they are just "high water marks". I am thinking just create a new file to store this. (highwatermark.yaml or timestamp.yaml) Its separate from config so makes sense to have a separate file. The nice thing about having it in a file is also the ability to easily reset the value. You can just delete the file to have it reset back to zero or if you know the value you want to start at you can just update that file without trying to update SQL or BoltDB directly. I have done that before where I forgot to add an employee to the config list and wanted to go back in time to pull their stats.

@kivilahtio
Copy link
Contributor Author

Hi!
That is a very good idea.
I guess ideally we'd try to follow the 12-factor-app design pattern, part of which is designing software components to not depend on any writable disk access, such as config- or highwatermark-files.

But given the ease of implementation, that might be a better idea in this case.
I am running this in a simple Linux VM with systemd, and just need visibility into our worklogs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants