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

Feat/seed vip #682

Merged
merged 10 commits into from
Oct 16, 2024
Merged

Feat/seed vip #682

merged 10 commits into from
Oct 16, 2024

Conversation

cemathey
Copy link
Collaborator

@cemathey cemathey commented Sep 5, 2024

This is a pretty straight forward port of https://github.com/cemathey/hll_seed_vip to run as a service inside of CRCON itself.

Made some minor tweaks since it can access info internally instead of using the API.

This runs as a separate service (like all the other plugins)
Has a user config and updated menu

Opening a draft PR; I'm going to set this up in dry run mode on ours and verify that I get the same results as my externally hosted one, then again the next day with dry run off and the other tool in dry run and verify again.

For future reference, this possible languages that can be used when using humanize to nicely format date/time quantities: https://github.com/MarechJ/hll_rcon_tool/wiki/Seed-VIP-Localization

@cemathey cemathey marked this pull request as ready for review September 9, 2024 17:32
@cemathey
Copy link
Collaborator Author

cemathey commented Sep 9, 2024

I've been running this for a few days on ours; looks to be working fine.

Copy link
Collaborator

@ElGuillermo ElGuillermo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only saw the bad "Documentation" error

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the "GTX Server Name Change" doc ;)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@cli.command(name="seed_vip")
def run_seed_vip():
config = SeedVIPUserConfig.load_from_db()
if config.enabled:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't this result in automatic restarts when the seed vip feature is disabled? (I mean supervisor restarting the service)

logger.debug(
f"Did not receive a usable result from `get_online_players`, continuing"
)
continue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be a sleep here as well? Otherwise the loop will re-reun this code instantly, isn't it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

logger.debug(
f"Did not receive a usable result from `get_gamestate`, continuing"
)
continue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as the comment before.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@cemathey cemathey merged commit 80ff605 into master Oct 16, 2024
@cemathey cemathey deleted the feat/seed_vip branch October 16, 2024 15:47
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.

3 participants