Skip to content

Commit

Permalink
Do not use poor man rollback for connections
Browse files Browse the repository at this point in the history
  • Loading branch information
iychoi committed Jun 8, 2022
1 parent 9ddf69e commit 16fd044
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cmd/gocmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ func processCommand(command *cobra.Command, args []string) error {
}

func main() {
log.SetFormatter(&log.TextFormatter{
TimestampFormat: "2006-01-02 15:04:05.000",
FullTimestamp: true,
})

logger := log.WithFields(log.Fields{
"package": "main",
"function": "main",
Expand Down
7 changes: 6 additions & 1 deletion commons/irodsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ const (

// returns a file system client
func GetIRODSFSClient(account *irodsclient_types.IRODSAccount) (*irodsclient_fs.FileSystem, error) {
return irodsclient_fs.NewFileSystemWithDefault(account, ClientProgramName)

fsConfig := irodsclient_fs.NewFileSystemConfig(ClientProgramName, irodsclient_fs.ConnectionLifespanDefault,
irodsclient_fs.FileSystemTimeoutDefault, irodsclient_fs.FileSystemTimeoutDefault, irodsclient_fs.FileSystemConnectionMaxDefault,
irodsclient_fs.FileSystemTimeoutDefault, irodsclient_fs.FileSystemTimeoutDefault, []irodsclient_fs.MetadataCacheTimeoutSetting{}, false, true)

return irodsclient_fs.NewFileSystem(account, fsConfig)
}

// TestConnect just test connection creation
Expand Down

0 comments on commit 16fd044

Please sign in to comment.