We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df414a8 commit 45f7cc5Copy full SHA for 45f7cc5
datastore.go
@@ -30,6 +30,13 @@ type Datastore struct {
30
31
// New - returns a new datastore which contains redis, database, view globals and settings.
32
func New() *Datastore {
33
+ store := Simple()
34
+ store.DB = getDBConnection(store.Settings)
35
+ store.Cache = getCacheConnection(store.Settings)
36
+ return store
37
+}
38
+
39
+func Simple() *Datastore {
40
store := &Datastore{}
41
settings := loadSettings()
42
@@ -61,8 +68,7 @@ func New() *Datastore {
61
68
log.Info("App Started. Server Is: " + settings.ServerIs)
62
69
63
70
store.Settings = settings
64
- store.DB = getDBConnection(settings)
65
- store.Cache = getCacheConnection(settings)
71
66
72
// store.S3 = getS3Connection()
67
73
return store
74
}
0 commit comments