upda/server/service_lock.go
Varakh 5763d77045
All checks were successful
/ build (push) Successful in 3m37s
Added locking, improve prometheus handling and change to more reasonable configuration defaults for background tasks
- Disable cleaning up stale updates and events by default
- Change Prometheus exporter behavior
  - Return -1 for deleted updates in Prometheus which are evicted on next application restart
  - Ignore PROMETHEUS_METRICS_PATH (defaults to /metrics) in application metrics
- Improve template Grafana Dashboard
- Add locking for background task in non-distributed environments to avoid overlaps
2023-12-23 22:51:51 +01:00

9 lines
163 B
Go

package server
type lockService interface {
init() error
tryLock(resource string) error
release(resource string) error
exists(resource string) bool
stop()
}