add config option to disable queues
This commit is contained in:
parent
d413d7def4
commit
273b43f5e0
2 changed files with 23 additions and 1 deletions
20
config/queue.go
Normal file
20
config/queue.go
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
// Copyright (c) 2025 Zeni Kim <zenik@smarteching.com>
|
||||||
|
// Use of this source code is governed by MIT-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package config
|
||||||
|
|
||||||
|
import "git.smarteching.com/goffee/core"
|
||||||
|
|
||||||
|
// Retrieve the main config for the Queue
|
||||||
|
func GetQueueConfig() core.QueueConfig {
|
||||||
|
//#####################################
|
||||||
|
//# Main configuration for Queue #####
|
||||||
|
//#####################################
|
||||||
|
|
||||||
|
return core.QueueConfig{
|
||||||
|
// For enabling and disabling the queue system
|
||||||
|
// set to true to enable it, set to false to disable
|
||||||
|
EnableQueue: false,
|
||||||
|
}
|
||||||
|
}
|
4
main.go
4
main.go
|
@ -62,7 +62,9 @@ func main() {
|
||||||
registerGlobalHooks()
|
registerGlobalHooks()
|
||||||
registerRoutes()
|
registerRoutes()
|
||||||
registerEvents()
|
registerEvents()
|
||||||
registerQueues()
|
if config.GetQueueConfig().EnableQueue == true {
|
||||||
|
registerQueues()
|
||||||
|
}
|
||||||
if config.GetGormConfig().EnableGorm == true {
|
if config.GetGormConfig().EnableGorm == true {
|
||||||
RunAutoMigrations()
|
RunAutoMigrations()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue