mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
fix indefinite start on locked db
This commit is contained in:
@@ -23,7 +23,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type args struct {
|
type args struct {
|
||||||
Port string `arg:"-p" help:"web server port, default :8090"`
|
Port string `arg:"-p" help:"web server port, default 8090"`
|
||||||
Path string `arg:"-d" help:"database dir path"`
|
Path string `arg:"-d" help:"database dir path"`
|
||||||
LogPath string `arg:"-l" help:"server log file path"`
|
LogPath string `arg:"-l" help:"server log file path"`
|
||||||
WebLogPath string `arg:"-w" help:"web access log file path"`
|
WebLogPath string `arg:"-w" help:"web access log file path"`
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package settings
|
|||||||
import (
|
import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"server/log"
|
"server/log"
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ type TDB struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewTDB() *TDB {
|
func NewTDB() *TDB {
|
||||||
db, err := bolt.Open(filepath.Join(Path, "config.db"), 0666, nil)
|
db, err := bolt.Open(filepath.Join(Path, "config.db"), 0666, &bolt.Options{Timeout: 5 * time.Second})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.TLogln(err)
|
log.TLogln(err)
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user