- 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>
20 lines
330 B
Go
20 lines
330 B
Go
package common
|
|
|
|
import (
|
|
"os"
|
|
"sync"
|
|
)
|
|
|
|
// FatalErrorsChan accepts errors from workers.
|
|
// In case of fatal error, gracefully
|
|
// exits the application.
|
|
var (
|
|
FatalErrorsChan chan error
|
|
SignalsChan chan os.Signal
|
|
WorkerWG sync.WaitGroup
|
|
)
|
|
|
|
const VERSION string = "0.0.1"
|
|
|
|
const CtxKeyLogger string = "CtxKeyLogger"
|