File tree Expand file tree Collapse file tree 3 files changed +3
-20
lines changed
sms-gateway/modules/devices Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ type Config struct {
1212 HTTP HTTP `yaml:"http"` // http server config
1313 Database Database `yaml:"database"` // database config
1414 FCM FCMConfig `yaml:"fcm"` // firebase cloud messaging config
15- Tasks Tasks `yaml:"tasks"` // tasks config
1615 SSE SSE `yaml:"sse"` // server-sent events config
1716 Messages Messages `yaml:"messages"` // messages config
1817 Cache Cache `yaml:"cache"` // cache (memory or redis) config
@@ -60,10 +59,6 @@ type FCMConfig struct {
6059 TimeoutSeconds uint16 `yaml:"timeout_seconds" envconfig:"FCM__TIMEOUT_SECONDS"` // push notification send timeout
6160}
6261
63- type Tasks struct {
64- Hashing HashingTask `yaml:"hashing"` // deprecated
65- }
66-
6762type HashingTask struct {
6863 IntervalSeconds uint16 `yaml:"interval_seconds" envconfig:"TASKS__HASHING__INTERVAL_SECONDS"` // deprecated
6964}
@@ -104,11 +99,6 @@ func Default() Config {
10499 FCM : FCMConfig {
105100 CredentialsJSON : "" ,
106101 },
107- Tasks : Tasks {
108- Hashing : HashingTask {
109- IntervalSeconds : uint16 (15 * 60 ),
110- },
111- },
112102 SSE : SSE {
113103 KeepAlivePeriodSeconds : 15 ,
114104 },
Original file line number Diff line number Diff line change @@ -109,16 +109,12 @@ func Module() fx.Option {
109109 }),
110110 fx .Provide (func (cfg Config ) messages.Config {
111111 return messages.Config {
112- CacheTTL : time .Duration (cfg .Messages .CacheTTLSeconds ) * time .Second ,
113- HashingInterval : time .Duration (
114- max (cfg .Tasks .Hashing .IntervalSeconds , cfg .Messages .HashingIntervalSeconds ),
115- ) * time .Second ,
112+ CacheTTL : time .Duration (cfg .Messages .CacheTTLSeconds ) * time .Second ,
113+ HashingInterval : time .Duration (cfg .Messages .HashingIntervalSeconds ) * time .Second ,
116114 }
117115 }),
118116 fx .Provide (func (_ Config ) devices.Config {
119- return devices.Config {
120- UnusedLifetime : 365 * 24 * time .Hour , //TODO: make it configurable
121- }
117+ return devices.Config {}
122118 }),
123119 fx .Provide (func (cfg Config ) sse.Config {
124120 return sse .NewConfig (
Original file line number Diff line number Diff line change 11package devices
22
3- import "time"
4-
53type Config struct {
6- UnusedLifetime time.Duration
74}
You can’t perform that action at this time.
0 commit comments