mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Adds BSQL thread limit to configuration options
This commit is contained in:
@@ -44,4 +44,8 @@
|
||||
min_val = 0
|
||||
protection = CONFIG_ENTRY_LOCKED
|
||||
|
||||
/datum/config_entry/number/bsql_thread_limit
|
||||
config_entry_value = 50
|
||||
min_val = 1
|
||||
|
||||
/datum/config_entry/flag/bsql_debug
|
||||
|
||||
@@ -76,7 +76,7 @@ SUBSYSTEM_DEF(dbcore)
|
||||
var/address = CONFIG_GET(string/address)
|
||||
var/port = CONFIG_GET(number/port)
|
||||
|
||||
connection = new /datum/BSQL_Connection(BSQL_CONNECTION_TYPE_MARIADB, CONFIG_GET(number/async_query_timeout), CONFIG_GET(number/blocking_query_timeout))
|
||||
connection = new /datum/BSQL_Connection(BSQL_CONNECTION_TYPE_MARIADB, CONFIG_GET(number/async_query_timeout), CONFIG_GET(number/blocking_query_timeout), CONFIG_GET(number/bsql_thread_limit))
|
||||
var/error
|
||||
if(QDELETED(connection))
|
||||
connection = null
|
||||
|
||||
@@ -38,5 +38,8 @@ ASYNC_QUERY_TIMEOUT 10
|
||||
## Must be less than or equal to ASYNC_QUERY_TIMEOUT
|
||||
BLOCKING_QUERY_TIMEOUT 5
|
||||
|
||||
## The maximum number of additional threads BSQL is allowed to run at once
|
||||
BSQL_THREAD_LIMIT 50
|
||||
|
||||
## Uncomment to enable verbose BSQL communication logs
|
||||
#BSQL_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user