diff --git a/export.go b/export.go index a06dad5..26f02f8 100644 --- a/export.go +++ b/export.go @@ -53,6 +53,7 @@ func (e *Export) WaitExportComplete(ctx context.Context, jobID int) (*ExportStat ) t := time.NewTicker(emarsysUpdateStatusPeriod) + defer t.Stop() for { select { @@ -64,8 +65,6 @@ func (e *Export) WaitExportComplete(ctx context.Context, jobID int) (*ExportStat status, err = e.CheckStatus(jobID) if err != nil { - t.Stop() - return nil, err } diff --git a/users.go b/users.go index 5db0b27..0021513 100644 --- a/users.go +++ b/users.go @@ -34,6 +34,8 @@ const ( PlatformOriginAll = "all" PlatformDefaultOriginID = "0" ExportDistributionMethodLocal = "local" + + defaultCSVDelimiter = "," ) type Users struct { @@ -475,6 +477,7 @@ func (u *Users) GetSegmentLocally(segmentID int, fields []int) (*ExportResult, e DistributionMethod: ExportDistributionMethodLocal, ContactFields: fields, AddFieldNamesHeader: 1, + Delimiter: defaultCSVDelimiter, }, Filter: segmentID, }) @@ -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{