mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 11:30:28 +00:00
return error from datastore.Close func
This commit is contained in:
parent
1e128e6ad7
commit
1fea0dc66f
@ -60,6 +60,6 @@ func before(c *cli.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func after(c *cli.Context) error {
|
func after(c *cli.Context) error {
|
||||||
app.database.Close()
|
err := app.database.Close()
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ type Datastore interface {
|
|||||||
GetAggregatedReferrerStatsPageviews(time.Time, time.Time) (int, error)
|
GetAggregatedReferrerStatsPageviews(time.Time, time.Time) (int, error)
|
||||||
|
|
||||||
// misc
|
// misc
|
||||||
Close()
|
Close() error
|
||||||
}
|
}
|
||||||
|
|
||||||
// New instantiates a new datastore from the given configuration struct
|
// New instantiates a new datastore from the given configuration struct
|
||||||
|
@ -62,6 +62,6 @@ func (db *sqlstore) Migrate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Closes the db pool
|
// Closes the db pool
|
||||||
func (db *sqlstore) Close() {
|
func (db *sqlstore) Close() error {
|
||||||
db.DB.Close()
|
return db.DB.Close()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user