fix panic
This commit is contained in:
parent
7dab620b1a
commit
fa8fb824da
@ -10,8 +10,10 @@ import (
|
||||
"github.com/TicketsBot/GoPanel/database"
|
||||
"github.com/TicketsBot/GoPanel/messagequeue"
|
||||
"github.com/TicketsBot/GoPanel/rpc/cache"
|
||||
"github.com/TicketsBot/GoPanel/rpc/ratelimit"
|
||||
"github.com/TicketsBot/GoPanel/utils"
|
||||
"github.com/apex/log"
|
||||
gdlratelimit "github.com/rxdn/gdl/rest/ratelimit"
|
||||
"math/rand"
|
||||
"time"
|
||||
)
|
||||
@ -35,6 +37,8 @@ func main() {
|
||||
messagequeue.Client = messagequeue.NewRedisClient()
|
||||
go Listen(messagequeue.Client)
|
||||
|
||||
ratelimit.Ratelimiter = gdlratelimit.NewRateLimiter(gdlratelimit.NewRedisStore(messagequeue.Client.Client, "ratelimit")) // TODO: Use values from config
|
||||
|
||||
http.StartServer()
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
package ratelimit
|
||||
|
||||
import (
|
||||
"github.com/TicketsBot/GoPanel/messagequeue"
|
||||
"github.com/rxdn/gdl/rest/ratelimit"
|
||||
)
|
||||
|
||||
var Ratelimiter = ratelimit.NewRateLimiter(ratelimit.NewRedisStore(messagequeue.Client.Client, "ratelimit")) // TODO: Use values from config
|
||||
var Ratelimiter *ratelimit.Ratelimiter
|
||||
|
Loading…
x
Reference in New Issue
Block a user