Improve crawler performance and worker coordination

- Add WaitGroup synchronization for workers to prevent overlapping scheduler runs
- Increase history fetch multiplier and sleep intervals for better resource usage
- Simplify error handling and logging in worker processing
- Update SQL query to exclude error snapshots from history selection
- Fix worker ID variable reference in spawning loop
- Streamline snapshot update logic and error reporting
This commit is contained in:
antanst
2025-06-19 09:59:50 +03:00
parent 59893efc3d
commit af42383513
4 changed files with 66 additions and 62 deletions

View File

@@ -1,6 +1,9 @@
package common
import "os"
import (
"os"
"sync"
)
// FatalErrorsChan accepts errors from workers.
// In case of fatal error, gracefully
@@ -8,6 +11,7 @@ import "os"
var (
FatalErrorsChan chan error
SignalsChan chan os.Signal
WorkerWG sync.WaitGroup
)
const VERSION string = "0.0.1"