Rework mirror update to support closing/reoping DB for the download duration

This requires splitting up import file phase as separate step in then end,
it should be pretty fast, as it only does file move (hardlink) and
DB update for new checksums.
This commit is contained in:
Andrey Smirnov
2017-04-26 00:14:13 +03:00
parent 7dcc0d597d
commit 01512df853
2 changed files with 49 additions and 30 deletions

View File

@@ -605,8 +605,9 @@ func (p *Package) PoolDirectory() (string, error) {
// PackageDownloadTask is a element of download queue for the package
type PackageDownloadTask struct {
File *PackageFile
Additional []PackageDownloadTask
File *PackageFile
Additional []PackageDownloadTask
TempDownPath string
}
// DownloadList returns list of missing package files for download in format