rssnyder / discord-stock-ticker

Add live stock & crypto prices to your discord sidebar.
https://rssnyder.github.io/discord-stock-ticker/
MIT License
293 stars 113 forks source link

[HELP] loading previous tickers without redis server? #105

Closed kakigorimochi closed 2 years ago

kakigorimochi commented 2 years ago

As the title suggests, is there a way to load or save previously set tickers?

I always need to re-configure the tickers whenever I reboot my VPS. I saw the "-db" feature but don't actually know how the feature works.

I am currently running CENTOS 7 as my Operating System.

rssnyder commented 2 years ago

From the readme: -db="" # file to store tickers in

kakigorimochi commented 2 years ago

From the readme: -db="" # file to store tickers in

sorry, but I am not sure what kind of file type it takes in. Is it an actual ".db" file? I am not sure how do I make one.

I even tried .txt and hope it would work. Sadly, I already knew it wouldn't, although it was worth a shot. haha

rssnyder commented 2 years ago

From the readme: -db="" # file to store tickers in

sorry, but I am not sure what kind of file type it takes in. Is it an actual ".db" file? I am not sure how do I make one.

I even tried .txt and hope it would work. Sadly, I already knew it wouldn't, although it was worth a shot. haha

just put any file name there, it will create a new file and make it an sqlite3 db. dont use an existing filename.

kakigorimochi commented 2 years ago

Can I assign/load the DB file in another directory or does it have to be in the same directory?

rssnyder commented 2 years ago

Can I assign/load the DB file in another directory or does it have to be in the same directory?

it can be anywhere

kakigorimochi commented 2 years ago

Can I assign/load the DB file in another directory or does it have to be in the same directory?

it can be anywhere

Thank you for your response... for some reason CENTOS 7 likes to count the quotes ("") as part of the name file that's why I get the error: "Unable to bootstrap db file: unable to open database file: not a directory" for the -db="" flag.

I tried removing the said quotes ("") in the discord-stock-ticker.service file and it finally worked.

Doesn't work for CENTOS 7 ExecStart = ./discord-stock-ticker -frequency=10 -db="./discord-stock-ticker/directory/filename"

Works for CENTOS 7 ExecStart = ./discord-stock-ticker -frequency=10 -db=./discord-stock-ticker/directory/filename

rssnyder commented 2 years ago

Can I assign/load the DB file in another directory or does it have to be in the same directory?

it can be anywhere

Thank you for your response... for some reason CENTOS 7 likes to count the quotes ("") as part of the name file that's why I get the error: "Unable to bootstrap db file: unable to open database file: not a directory" for the -db="" flag.

I tried removing the said quotes ("") in the discord-stock-ticker.service file and it finally worked.

Doesn't work for CENTOS 7 ExecStart = ./discord-stock-ticker -frequency=10 -db="./discord-stock-ticker/directory/filename"

Works for CENTOS 7 ExecStart = ./discord-stock-ticker -frequency=10 -db=./discord-stock-ticker/directory/filename

yeah i dont use quotes in my systemd files.

sounds like you got it working, care if i close this issue?