Skip to content

Commit

Permalink
Fixed export params
Browse files Browse the repository at this point in the history
  • Loading branch information
Сергей Квартников committed Oct 1, 2020
1 parent 90530b4 commit e02788a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions export.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ func (e *Export) WaitExportComplete(ctx context.Context, jobID int) (*ExportStat
}

if status.Data.Status == ExportStatusDone || status.Data.Status == ExportStatusError {
t.Stop()

break
}
}
Expand Down
4 changes: 4 additions & 0 deletions users.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const (
PlatformOriginAll = "all"
PlatformDefaultOriginID = "0"
ExportDistributionMethodLocal = "local"

defaultCSVDelimiter = ","
)

type Users struct {
Expand Down Expand Up @@ -475,6 +477,7 @@ func (u *Users) GetSegmentLocally(segmentID int, fields []int) (*ExportResult, e
DistributionMethod: ExportDistributionMethodLocal,
ContactFields: fields,
AddFieldNamesHeader: 1,
Delimiter: defaultCSVDelimiter,
},
Filter: segmentID,
})
Expand All @@ -486,6 +489,7 @@ func (u *Users) GetAllChangesLocally(startTime, endTime time.Time, fields []int)
DistributionMethod: ExportDistributionMethodLocal,
ContactFields: fields,
AddFieldNamesHeader: 1,
Delimiter: defaultCSVDelimiter,
},
Origin: PlatformOriginAll,
TimeRange: []string{
Expand Down

0 comments on commit e02788a

Please sign in to comment.