Skip to content

Deleted Field Fix and Force Potentially Deleted Worlds Offline - #160

Merged
omrih4 merged 5 commits into
LegitiDevs:masterfrom
ThisIsMyName314:work19Oct26
Oct 19, 2026
Merged

omrih4 merged 5 commits into
LegitiDevs:masterfrom
ThisIsMyName314:work19Oct26

Conversation

@ThisIsMyName314

Copy link
Copy Markdown
Contributor

This fixes the bug where worlds are never set to deleted even if they haven't been scraped for 24hrs. I believe it was because the only worlds being checked where ones that had just been scraped, and so no outdated ones were caught.

It also sets worlds that have not been scraped for 6 hours to be offline with a player count of 0. The reason for the latter is that it stops deleted worlds from appearing active and being amongst worlds that are actually online, such as on the browse page https://legiti.dev/browse.

Deleted field and setting worlds to offline:

After each 10th scrape (approximately 30 minutes), Scraper#markDeletedWorlds is now called, which finds and marks all worlds that haven't been scraped for 24Hrs or more as deleted and offline. Worlds that have not been scraped for 6 hours are set to offline (including having their player count set to 0).

There is a new constant (UNLOCK_TIME_MILLIS) for the latter.

Other changes:

Both calls to closeContainer in Scraper now do so on the render thread (or client thread?), which I believe has removed the warnings about calling it from a different one.

There is a new method isConnected in Database which returns whether the mongo database is set up and working. This is checked before each scrape. I believe has fixed the client freezing when joining a server without mongodb running.

Tested:

I've quite thoroughly tested the changes locally so I'm quite confident everything works.

@hablethedev

Copy link
Copy Markdown
Contributor

Light Goob Tree Miner

@hablethedev
hablethedev requested a review from omrih4 October 19, 2026 14:56
@omrih4
omrih4 merged commit 283ca02 into LegitiDevs:master Oct 19, 2026
1 check passed
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