mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-06-02 03:20:34 +02:00
Cosmetic changes
This commit is contained in:
parent
f94bb1aa30
commit
7b23158e0a
3 changed files with 35 additions and 45 deletions
server
|
@ -270,7 +270,7 @@ func newSqliteCache(filename, startupQueries string, cacheDuration time.Duration
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := setupDB(db, startupQueries, cacheDuration); err != nil {
|
||||
if err := setupMessagesDB(db, startupQueries, cacheDuration); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var queue *util.BatchingQueue[*message]
|
||||
|
@ -749,7 +749,7 @@ func (c *messageCache) Close() error {
|
|||
return c.db.Close()
|
||||
}
|
||||
|
||||
func setupDB(db *sql.DB, startupQueries string, cacheDuration time.Duration) error {
|
||||
func setupMessagesDB(db *sql.DB, startupQueries string, cacheDuration time.Duration) error {
|
||||
// Run startup queries
|
||||
if startupQueries != "" {
|
||||
if _, err := db.Exec(startupQueries); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue