Add an auto-cleanup worker
This commit is contained in:
parent
99988a7fd2
commit
ac57440c2e
5 changed files with 136 additions and 7 deletions
|
|
@ -35,11 +35,12 @@ import (
|
|||
|
||||
// Config represents the application configuration
|
||||
type Config struct {
|
||||
DevProxy string
|
||||
Bind string
|
||||
Database DatabaseConfig
|
||||
Email EmailConfig
|
||||
Analysis AnalysisConfig
|
||||
DevProxy string
|
||||
Bind string
|
||||
Database DatabaseConfig
|
||||
Email EmailConfig
|
||||
Analysis AnalysisConfig
|
||||
ReportRetention time.Duration // How long to keep reports. 0 = keep forever
|
||||
}
|
||||
|
||||
// DatabaseConfig contains database connection settings
|
||||
|
|
@ -65,8 +66,9 @@ type AnalysisConfig struct {
|
|||
// DefaultConfig returns a configuration with sensible defaults
|
||||
func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
DevProxy: "",
|
||||
Bind: ":8081",
|
||||
DevProxy: "",
|
||||
Bind: ":8081",
|
||||
ReportRetention: 0, // Keep reports forever by default
|
||||
Database: DatabaseConfig{
|
||||
Type: "sqlite",
|
||||
DSN: "happydeliver.db",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue