Skip to content

Commit

Permalink
refactor(recurring-job): remove unused method
Browse files Browse the repository at this point in the history
Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang committed Feb 22, 2024
1 parent 3bc6b5c commit e3d4e35
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions app/recurring_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,24 +823,6 @@ func (job *Job) GetSettingAsBool(name types.SettingName) (bool, error) {
return value, nil
}

// waitForVolumeState timeout in second
func (job *Job) waitForVolumeState(state string, timeout int) (*longhornclient.Volume, error) {
volumeAPI := job.api.Volume
volumeName := job.volumeName

for i := 0; i < timeout; i++ {
volume, err := volumeAPI.ById(volumeName)
if err == nil {
if volume.State == state {
return volume, nil
}
}
time.Sleep(1 * time.Second)
}

return nil, fmt.Errorf("timeout waiting for volume %v to be in state %v", volumeName, state)
}

// handleAttachmentTicketCreation check and create attachment so that the source volume doesn't get detached during the job.
func (job *Job) handleAttachmentTicketCreation(volumeName string) (err error) {
defer func() {
Expand Down

0 comments on commit e3d4e35

Please sign in to comment.