mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 08:36:00 +01:00
Qdels queries, adds sleep safety checks, DBcore checks for leaks (#38363)
* Qdels all queries, adds sleep handling * DB Core messages admins about undeleted queries * Compile fixes. Adds missing set waitfor * Remove world/New shennanigans. Add DBQuery/BlockingExecute() * Less spammy notifications to admins about undeleted queries * Increase dbcore fire time to 1 minute * Upgrade undeleted query warning * Better place of death * Fix build * Remove BlockingExecute, see BSQL PR for why * Yep, missed that one. * Psyche, that's the WRONG QUERY!!
This commit is contained in:
committed by
vuonojenmustaturska
parent
7b2fb71c1d
commit
cf7e8aa9ec
@@ -51,6 +51,7 @@
|
||||
))
|
||||
"})
|
||||
if(!query_get_ip_intel.Execute())
|
||||
qdel(query_get_ip_intel)
|
||||
return
|
||||
if (query_get_ip_intel.NextRow())
|
||||
res.cache = TRUE
|
||||
@@ -59,14 +60,16 @@
|
||||
res.cacheminutesago = text2num(query_get_ip_intel.item[3])
|
||||
res.cacherealtime = world.realtime - (text2num(query_get_ip_intel.item[3])*10*60)
|
||||
SSipintel.cache[ip] = res
|
||||
qdel(query_get_ip_intel)
|
||||
return
|
||||
qdel(query_get_ip_intel)
|
||||
res.intel = ip_intel_query(ip)
|
||||
if (updatecache && res.intel >= 0)
|
||||
SSipintel.cache[ip] = res
|
||||
if(SSdbcore.Connect())
|
||||
var/datum/DBQuery/query_add_ip_intel = SSdbcore.NewQuery("INSERT INTO [format_table_name("ipintel")] (ip, intel) VALUES (INET_ATON('[ip]'), [res.intel]) ON DUPLICATE KEY UPDATE intel = VALUES(intel), date = NOW()")
|
||||
query_add_ip_intel.Execute()
|
||||
|
||||
qdel(query_add_ip_intel)
|
||||
|
||||
|
||||
/proc/ip_intel_query(ip, var/retryed=0)
|
||||
|
||||
Reference in New Issue
Block a user