Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit 49b5b20

Browse files
Caching clean up (#19)
* clean up caching Signed-off-by: Ayman <enkhalifapro@gmail.com> * clean up caching Signed-off-by: Ayman <enkhalifapro@gmail.com> * code clean up Signed-off-by: Ayman <enkhalifapro@gmail.com> --------- Signed-off-by: Ayman <enkhalifapro@gmail.com> Co-authored-by: Ayman <enkhalifapro@gmail.com>
1 parent bc1af30 commit 49b5b20

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cmd/jira/jira.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,6 @@ func (j *DSJira) OutputDocs(ctx *shared.Ctx, items []interface{}, docs *[]interf
672672
insightsStr := "insights"
673673
issuesStr := "issues"
674674
envStr := os.Getenv("STAGE")
675-
data := make([]map[string]interface{}, 0)
676675
for k, v := range issuesData {
677676
switch k {
678677
case "created":
@@ -727,10 +726,6 @@ func (j *DSJira) OutputDocs(ctx *shared.Ctx, items []interface{}, docs *[]interf
727726
if err = j.cacheProvider.UpdateFileByKey(j.endpoint, commentsCacheFile, comB); err != nil {
728727
return
729728
}
730-
err = j.cacheProvider.Create(fmt.Sprintf("%s/%s", j.endpoint, JiraIssue), data)
731-
if err != nil {
732-
j.log.WithFields(logrus.Fields{"operation": "OutputDocs"}).Errorf("error creating cache for endpoint %s/%s. Error: %+v", j.endpoint, JiraIssue, err)
733-
}
734729
} else {
735730
jsonBytes, err = jsoniter.Marshal(issuesData)
736731
}
@@ -1821,6 +1816,7 @@ func (j *DSJira) Sync(ctx *shared.Ctx) (err error) {
18211816
j.log.WithFields(logrus.Fields{"operation": "Sync"}).Infof("%s resuming from %v (%d threads)", j.Endpoint(ctx), ctx.DateFrom, thrN)
18221817
}
18231818
}
1819+
cachedIssues = make(map[string]EntityCache)
18241820
j.getCachedIssues()
18251821
if err = j.getCachedComments(); err != nil {
18261822
return

0 commit comments

Comments
 (0)