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

Debug reboot failures #923

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/tgs.config.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
#define TGS_NOTIFY_ADMINS(event) message_admins(##event)
#define TGS_CLIENT_COUNT GLOB.clients.len
#define TGS_PROTECT_DATUM(Path) GENERAL_PROTECT_DATUM(##Path)
#define TGS_DEBUG_LOG(message) log_world("TGS Debug: [##message]")
9 changes: 8 additions & 1 deletion code/game/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,17 @@ GLOBAL_VAR(restart_counter)
shutdown_logging() // See comment below.
TgsEndProcess()

log_world("World rebooted at [time_stamp()]")
log_world("Attempting world reboot at [time_stamp()].")

log_world("Awaiting rust_g shutdown.")
shutdown_logging() // Past this point, no logging procs can be used besides log_world() at risk of data loss.
log_world("rust_g shutdown successful.")

log_world("Awaiting TGS reboot")
TgsReboot() // TGS can decide to kill us right here, so it's important to do it last
log_world("TGS reboot successful.")

log_world("World rebooted at [time_stamp()].")
..()

/world/proc/update_status()
Expand Down
Loading