Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
YangSen-qn committed Jun 8, 2023
1 parent ad0efce commit c4c2c43
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion iqshell/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func loadWorkspace(cfg *Config) (shouldContinue bool) {
dir, gErr := os.Getwd()
if gErr != nil {
_, _ = fmt.Fprintf(os.Stderr, "get current directory: %v\n", gErr)
os.Exit(1)
os.Exit(data.StatusError)
}
workspacePath = dir
}
Expand Down
10 changes: 8 additions & 2 deletions iqshell/storage/bucket/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ type ListApiInfo struct {
CacheDir string // 历史数据存储路径 【内部使用】
}

func (l *ListApiInfo) init() {
if l.V1Limit == 0 {
l.V1Limit = 250
}
}

func ListObjectField(field string) string {
for _, f := range listObjectFields {
if strings.EqualFold(field, f) {
Expand Down Expand Up @@ -75,8 +81,8 @@ func List(info ListApiInfo,
return
}

log.Debug("will list bucket")
log.DebugF("Suffixes:%s", info.Suffixes)
info.init()
log.DebugF("will list bucket:%s, suffixes:%s, prefix:%s", info.Bucket, info.Suffixes, info.Prefix)
shouldCheckPutTime := !info.StartTime.IsZero() || !info.EndTime.IsZero()
shouldCheckSuffixes := len(info.Suffixes) > 0
shouldCheckFileTypes := len(info.FileTypes) > 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ func (w *workProvider) getWorkInfoFromBucket() {
if err != nil {
log.ErrorF("download list bucket error:%v", err)
}
data.SetCmdStatus(data.StatusError)
})
close(w.downloadItemChan)
}()
Expand Down

0 comments on commit c4c2c43

Please sign in to comment.