incorporate postgres patch with minor changes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-04-05 22:37:22 -07:00
parent 9376944373
commit e6647e47f7
7 changed files with 103 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
package process
import (
"fmt"
"os"
"time"
@@ -9,6 +10,7 @@ import (
"git.eeqj.de/sneak/feta/locator"
"git.eeqj.de/sneak/feta/manager"
"git.eeqj.de/sneak/feta/storage"
_ "github.com/jinzhu/gorm/dialects/postgres"
_ "github.com/jinzhu/gorm/dialects/sqlite"
"github.com/k0kubun/pp"
"github.com/mattn/go-isatty"
@@ -56,7 +58,7 @@ func (f *Feta) configure() {
viper.SetDefault("TootsToDB", true)
viper.SetDefault("HostDiscoveryParallelism", 5)
viper.SetDefault("FSStorageLocation", os.ExpandEnv("$HOME/Library/ApplicationSupport/feta/tootarchive.d"))
viper.SetDefault("DBStorageLocation", os.ExpandEnv("$HOME/Library/ApplicationSupport/feta/feta.state.db"))
viper.SetDefault("DBURL", fmt.Sprintf("sqlite://%s", os.ExpandEnv("$HOME/Library/ApplicationSupport/feta/feta.state.db")))
viper.SetDefault("LogReportInterval", time.Second*10)
if err := viper.ReadInConfig(); err != nil {