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 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user