mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] Add interaction policy gtsmodels (#3075)
* [chore] introduce interaction policy gts models * update migration a smidge * fix copy paste typo * update migration * use int for InteractionType
This commit is contained in:
@@ -3250,6 +3250,33 @@ func GetCacheInstanceMemRatio() float64 { return global.GetCacheInstanceMemRatio
|
||||
// SetCacheInstanceMemRatio safely sets the value for global configuration 'Cache.InstanceMemRatio' field
|
||||
func SetCacheInstanceMemRatio(v float64) { global.SetCacheInstanceMemRatio(v) }
|
||||
|
||||
// GetCacheInteractionApprovalMemRatio safely fetches the Configuration value for state's 'Cache.InteractionApprovalMemRatio' field
|
||||
func (st *ConfigState) GetCacheInteractionApprovalMemRatio() (v float64) {
|
||||
st.mutex.RLock()
|
||||
v = st.config.Cache.InteractionApprovalMemRatio
|
||||
st.mutex.RUnlock()
|
||||
return
|
||||
}
|
||||
|
||||
// SetCacheInteractionApprovalMemRatio safely sets the Configuration value for state's 'Cache.InteractionApprovalMemRatio' field
|
||||
func (st *ConfigState) SetCacheInteractionApprovalMemRatio(v float64) {
|
||||
st.mutex.Lock()
|
||||
defer st.mutex.Unlock()
|
||||
st.config.Cache.InteractionApprovalMemRatio = v
|
||||
st.reloadToViper()
|
||||
}
|
||||
|
||||
// CacheInteractionApprovalMemRatioFlag returns the flag name for the 'Cache.InteractionApprovalMemRatio' field
|
||||
func CacheInteractionApprovalMemRatioFlag() string { return "cache-interaction-approval-mem-ratio" }
|
||||
|
||||
// GetCacheInteractionApprovalMemRatio safely fetches the value for global configuration 'Cache.InteractionApprovalMemRatio' field
|
||||
func GetCacheInteractionApprovalMemRatio() float64 {
|
||||
return global.GetCacheInteractionApprovalMemRatio()
|
||||
}
|
||||
|
||||
// SetCacheInteractionApprovalMemRatio safely sets the value for global configuration 'Cache.InteractionApprovalMemRatio' field
|
||||
func SetCacheInteractionApprovalMemRatio(v float64) { global.SetCacheInteractionApprovalMemRatio(v) }
|
||||
|
||||
// GetCacheListMemRatio safely fetches the Configuration value for state's 'Cache.ListMemRatio' field
|
||||
func (st *ConfigState) GetCacheListMemRatio() (v float64) {
|
||||
st.mutex.RLock()
|
||||
|
Reference in New Issue
Block a user