frozenpandaman / splatnet2statink

Takes battle data from the SplatNet 2 app and uploads it to stat.ink
https://github.com/frozenpandaman/splatnet2statink/wiki
347 stars 61 forks source link

Salmon monitoring #118

Closed iraizo closed 3 years ago

iraizo commented 3 years ago

Hello, im a user that normally runs splatnet2statink in a systemd service so it 24/7 uploads my statistics if my pc is on, the problem im having is that the salmon run mode does not support that, let alone the fact that you need to start the script twice and have 2 different services everytime, i achieve monitoring mode by using:

[Unit]
Description=Takes  salmon data from the SplatNet 2 app and uploads it to stat.ink. 
[Service]
ExecStart=/usr/bin/python splatnet2statink.py --salmon -r
WorkingDirectory=/opt/splatnet2statink
Restart=always
RestartSec=1800s

[Install]
WantedBy=multi-user.target

But this does not really fix the issue but is a workaround.

frozenpandaman commented 3 years ago

Hi! The Salmon Run functionality is sort of a separate service, mirroring the separate mode of the game (as both can't be played at the same time), and was added in long after the initial release of the script due to the fact Salmon Run stats weren't present in the NSO app until a while into the game's life. The script also isn't originally intentioned to be run as a daemon/always-on service and, while this is supported (just make sure you're not spamming the API please), I didn't write the script originally with the idea of having two types of monitoring services running at once in a single script, which is why you need one for regular battles and one for Salmon Run games. My personal use case is just to run the script at (only) the times I'm playing the game, which is still evident in the script some ways, I guess. :)

Salmon Run doesn't support monitoring mode but it seems you have a good way to achieve identical effect (run it and have it upload all new battles every x minutes or x battles). At this point in the script and game's lifetime I don't think I'll be making a major update to add that in, which would require rewriting a lot of code, but I'm happy you've found a solution!

iraizo commented 3 years ago

Thanks for the reply, and I defenitly understand why you wouldn't add that since splatoon 3 already has been announced, and yes i am only running the script when playing splatoon 2 but i still like to have services for it, thanks for making this script tho, saves me a lot of time :)

frozenpandaman commented 3 years ago

Glad it's useful!! :)