Skip to content

Commit

Permalink
Make failFast upload service param public (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
sverdlov93 authored Sep 19, 2024
1 parent 412e1ed commit b3f740b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
- [Delete Release Bundle Version](#delete-release-bundle-version)
- [Delete Release Bundle Version Promotion](#delete-release-bundle-version-promotion)
- [Export Release Bundle Archive](#export-release-bundle-archive)
- [Import Release Bundle](#import-release-bundle)
- [Import Release Bundle Archive](#import-release-bundle-archive)
- [Remote Delete Release Bundle](#remote-delete-release-bundle)
- [Lifecycle APIs](#lifecycle-apis)
- [Creating Lifecycle Service Manager](#creating-lifeCycle-service-manager)
Expand Down Expand Up @@ -472,8 +472,8 @@ TargetPathInArchive := "archive/path/"
SizeLimit= &fspatterns.SizeThreshold{SizeInBytes: 10000, Condition: fspatterns.LessThan}

uploadServiceOptions := &UploadServiceOptions{
// Set to true to fail the upload operation if any of the files fail to upload
FailFast: false,
// Set to true to fail the upload operation if any of the files fail to upload
FailFast: false,
}

totalUploaded, totalFailed, err := rtManager.UploadFiles(uploadServiceOptions, params)
Expand Down
4 changes: 2 additions & 2 deletions artifactory/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,15 @@ func (sm *ArtifactoryServicesManagerImp) GetItemProps(relativePath string) (*uti

type UploadServiceOptions struct {
// Fail the operation immediately if an error occurs.
failFast bool
FailFast bool
}

func (sm *ArtifactoryServicesManagerImp) initUploadService(uploadServiceOptions UploadServiceOptions) *services.UploadService {
uploadService := services.NewUploadService(sm.client)
uploadService.Threads = sm.config.GetThreads()
uploadService.ArtDetails = sm.config.GetServiceDetails()
uploadService.DryRun = sm.config.IsDryRun()
uploadService.SetFailFast(uploadServiceOptions.failFast)
uploadService.SetFailFast(uploadServiceOptions.FailFast)
uploadService.Progress = sm.progress
httpClientDetails := uploadService.ArtDetails.CreateHttpClientDetails()
uploadService.MultipartUpload = utils.NewMultipartUpload(sm.client, &httpClientDetails, uploadService.ArtDetails.GetUrl())
Expand Down

0 comments on commit b3f740b

Please sign in to comment.