fix panic

This commit is contained in:
Cyberes 2023-12-13 14:31:00 -07:00
parent e9db83f09b
commit 631844fb98
2 changed files with 4 additions and 3 deletions

View File

@ -93,6 +93,10 @@ func main() {
log.Infof("Elasticsearch enabled: %t", cfg.ElasticsearchEnable) log.Infof("Elasticsearch enabled: %t", cfg.ElasticsearchEnable)
if cfg.ElasticsearchSyncEnable {
elastic.InitializeWorkers()
}
Workers.InitializeWorkers() Workers.InitializeWorkers()
cache.InitRecacheSemaphore(cfg.CacheRecacheCrawlerLimit) cache.InitRecacheSemaphore(cfg.CacheRecacheCrawlerLimit)

View File

@ -12,9 +12,6 @@ var Queue *DeleteJobQueue
var syncLock sync.Mutex var syncLock sync.Mutex
func SyncThread() { func SyncThread() {
Queue = NewJobQueue()
InitializeWorkers()
createCrazyfsIndex() createCrazyfsIndex()
// Test connection to Elastic. // Test connection to Elastic.