Closed obj-obj closed 1 year ago
Not even close to being done but im putting it here anyway
Hmm that was surprisingly easy, the code works now at least on my machine Only step left is to add a config option, I'll do that later
This is so good when the server is configured to sleep after only 1 second of inactivity It feels like the server is always on because there's no lag when joining the game, the process instantly gets resumed
Thanks a lot for this! I'll take a look at this later as I'm currently on holiday.
Maybe the unsafe bits can be removed by using the nix
crate.
Yeah using the nix
crate is cleaner and I was able to get rid of the entire unix.rs
file
Code worked first try, no way
@timvisee it's ready now with a config option (defaults to true
), review it whenever you have time
Oh wait I didn't add a check to make sure the system is running on unix before defaulting to true so it would be broken by default on windows
Hope this gets seen, it's been a while since the last update
Sorry once again for the delay. I promise to give this a proper check ASAP!
Sorry once again for the delay. I promise to give this a proper check ASAP!
Obviously I do not want to press you mister, your work is incredible, I am just a big fan of lazymc, it is a true relief for SBCs, and my main "selling point" for my project ahahahah
Thanks a lot for your work on this! You've made some great changes and improvements.
You enable freeing by default. I do prefer having it disabled by default though. Freezing would still waste memory, whereas freeing this by shutting down was one of the selling points of this projects. What do you think of this, what made you enable by default? What do others think?
I've added some review comments. Don't worry, you did a fantastic job. Those are mostly nitpicks. Are you fine by looking into them to make the appropriate changes? I'd also be happy to do it for you.
I enabled it by default because I thought that most people would want it enabled by default. It does waste more memory, but I'm personally using this project to make the computer that's running the minecraft server to idle at lower wattage (minecraft uses 15% of a thread doing nothing when no players are online, even if the server isn't ticking, and it made the server idle 20W higher for some reason)
I didn't really consider ram usage until now, maybe we should do a poll or something?
Also another thing that we might need to do - if you set the sleep timeout to a really small value, like 1 second, while clients are on a slow connection
lazymc will detect the connection, start the server, and then put the server back to sleep if it takes more than 1 second for the client to join the server
Also another thing that we might need to do - if you set the sleep timeout to a really small value, like 1 second, while clients are on a slow connection
A minimum online time (for the server) can be configured here to prevent this:
Also another thing that we might need to do - if you set the sleep timeout to a really small value, like 1 second, while clients are on a slow connection
A minimum online time (for the server) can be configured here to prevent this:
Ah, I didn't see that option
Maybe we should make it default to 30 seconds (same as the minecraft client timeout) if freezing the process is also enables?
Did some testing today. Works perfectly! It instantly resumes, that's awesome. :rocket:
I did found one problem though. When rcon.enabled = true
lazymc shuts down the server through rcon rather than freezing the process. It seems rcon has priority over freezing the process. I'll be able to patch that later today or tomorrow.
On second thought, I'm happy to keep freeze_process
enabled by default.
Nice to read that, hope to see the new release soon, I'm so much hyped, I don't even play Minecraft anymore, but it's just a playground for devs
I'll implement the required changes to merge this now.
@timvisee how do you get the repository to mirror with ci status from gitlab? I might do that so I can develop on gitlab but still have the project visible on github
You can enable repository mirroring in GitLab (Repository -> Settings -> Repository -> Mirroring repository).
To add the GitLab CI status to your GitHub commits, enable the GitHub integration over on GitLab (Repository -> Settings -> Integrations -> GitHub).
You can enable repository mirroring in GitLab (Repository -> Settings -> Repository -> Mirroring repository).
To add the GitLab CI status to your GitHub commits, enable the GitHub integration over on GitLab (Repository -> Settings -> Integrations -> GitHub).
Oh thanks, that integration was the step I was missing
Edit: premium only :(
Edit: premium only :(
That's a bummer! Maybe I enabled it before this became a premium feature.
@timvisee They just gave me ultimate after filling out a form and giving a screenshot of my license
Aint no way 💀
Works on https://github.com/timvisee/lazymc/issues/7