Skip to content

Commit

Permalink
add constants for timeout values
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Knop <[email protected]>
  • Loading branch information
Alex Knop committed Feb 6, 2025
1 parent e415529 commit a0fdf00
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ class GetRemoteFileTask(

data class Result(val success: Boolean = false, val file: OCFile = OCFile("/"))

// Define constants for timeouts
companion object {
private const val CONNECTION_TIMEOUT = 1000
private const val READ_TIMEOUT = 1000
}

override fun invoke(): Result {
val sessionTimeout = SessionTimeOut(1000, 1000)
val sessionTimeout = SessionTimeOut(READ_TIMEOUT, CONNECTION_TIMEOUT)
val result = ReadFileRemoteOperation(fileUrl, sessionTimeout).execute(client)
if (result.isSuccess) {
val remoteFile = result.getData().get(0) as RemoteFile
Expand Down

0 comments on commit a0fdf00

Please sign in to comment.