moved db conn variable to db.go
This commit is contained in:
parent
5a481121d2
commit
b47bd9ed56
fedilogue
@ -6,6 +6,8 @@ import (
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
)
|
||||
|
||||
var pool *pgxpool.Pool
|
||||
|
||||
func getDbPool() *pgxpool.Pool {
|
||||
// Setup Database
|
||||
dbURI := fmt.Sprintf("postgres://%s:%s@%s:%d/fedilogue", settings.Database.Username, settings.Database.Password, settings.Database.Host, settings.Database.Port)
|
||||
|
@ -1,20 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"sync"
|
||||
"time"
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
)
|
||||
|
||||
// Current instances
|
||||
var runninginstances map[string]RunningInstance
|
||||
var ri_mutex = &sync.Mutex{}
|
||||
var pool *pgxpool.Pool
|
||||
|
||||
func startpprof() {
|
||||
logInfo("Starting http/pprof on :7777")
|
||||
|
Loading…
x
Reference in New Issue
Block a user