Small MC refactor (#20017)

* Small MC refactor

* Order fix

* Nabs tgstation/tgstation#27324

* Oops

* gnarg
This commit is contained in:
AffectedArc07
2023-01-18 12:06:24 -06:00
committed by GitHub
parent ea9e1969a4
commit 946fb4dff6
99 changed files with 337 additions and 465 deletions
+3 -3
View File
@@ -1,10 +1,11 @@
SUBSYSTEM_DEF(http)
name = "HTTP"
flags = SS_TICKER | SS_BACKGROUND // Measure in ticks, but also only run if we have the spare CPU. We also dont init.
flags = SS_TICKER | SS_BACKGROUND // Measure in ticks, but also only run if we have the spare CPU.
wait = 1
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY // All the time
// Assuming for the worst, since only discord is hooked into this for now, but that may change
offline_implications = "The server is no longer capable of making async HTTP requests. Shuttle call recommended."
cpu_display = SS_CPUDISPLAY_LOW
/// List of all async HTTP requests in the processing chain
var/list/datum/http_request/active_async_requests
/// Variable to define if logging is enabled or not. Disabled by default since we know the requests the server is making. Enable with VV if you need to debug requests
@@ -16,9 +17,8 @@ SUBSYSTEM_DEF(http)
. = ..()
rustg_create_async_http_client() // Open the door
/datum/controller/subsystem/http/Initialize(start_timeofday)
/datum/controller/subsystem/http/Initialize()
active_async_requests = list()
return ..()
/datum/controller/subsystem/http/get_stat_details()
return "P: [length(active_async_requests)] | T: [total_requests]"