| 134 | } |
| 135 | |
| 136 | type sqlDatabase struct { |
| 137 | conn *gorm.DB |
| 138 | sqlDB *sql.DB |
| 139 | |
| 140 | // objectsConn is a separate GORM connection to the objects database |
| 141 | objectsConn *gorm.DB |
| 142 | objectsSQLDB *sql.DB |
| 143 | |
| 144 | ctx context.Context |
| 145 | cfg config.Database |
| 146 | producer common.Producer |
| 147 | } |
| 148 | |
| 149 | // startSQLiteMaintenance runs periodic WAL checkpoint and VACUUM on both the |
| 150 | // main database and the objects database (if present). This reclaims disk space |
nothing calls this directly
no outgoing calls
no test coverage detected