From 16fd044114ebd4688328ace2cc8ae13e2178525b Mon Sep 17 00:00:00 2001 From: Illyoung Choi Date: Wed, 8 Jun 2022 11:11:46 -0700 Subject: [PATCH] Do not use poor man rollback for connections --- cmd/gocmd.go | 5 +++++ commons/irodsclient.go | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cmd/gocmd.go b/cmd/gocmd.go index d2461c7..15b966e 100644 --- a/cmd/gocmd.go +++ b/cmd/gocmd.go @@ -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", diff --git a/commons/irodsclient.go b/commons/irodsclient.go index 0c583ba..5fd4a44 100644 --- a/commons/irodsclient.go +++ b/commons/irodsclient.go @@ -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