mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-22 11:08:20 +00:00
every go routine needs to have its own collection factory
this is needed so concurrent reads and writes are possible.
This commit is contained in:
1 parent
4a6d53e16d
commit
208a2151c1
48 files changed
+305
-387
No files matched your search
@@ -64,7 +64,8 @@ func aptlyMirrorCreate(cmd *commander.Command, args []string) error {
|
||||
return fmt.Errorf("unable to fetch mirror: %s", err)
|
||||
}
|
||||
|
||||
err = context.CollectionFactory().RemoteRepoCollection().Add(repo)
|
||||
collectionFactory := context.NewCollectionFactory()
|
||||
err = collectionFactory.RemoteRepoCollection().Add(repo)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to add mirror: %s", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user