-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/cache topics impl #105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you address the copy paste naming please?
cache/mock.go
Outdated
mockDataTopic.List = NewSubTopicsMap() | ||
mockDataTopic.List.AppendSubtopicID("economy", Subtopic{ID: "6734", Slug: "economy", LocaliseKeyName: "Economy", ReleaseDate: timeHelper("2022-10-10T08:30:00Z"), ParentID: ""}) | ||
mockDataTopic.List.AppendSubtopicID("environmentalaccounts", Subtopic{ID: "1834", Slug: "environmentalaccounts", LocaliseKeyName: "Environmental Accounts", ReleaseDate: timeHelper("2022-10-10T08:30:00Z"), ParentID: "6734"}) | ||
mockDataTopic.List.AppendSubtopicID("governmentpublicsectorandtaxes", Subtopic{ID: "8268", Slug: "governmentpublicsectorandtaxes", LocaliseKeyName: "Government Public Sector and Taxes", ReleaseDate: timeHelper("2022-10-10T08:30:00Z"), ParentID: "6734"}) | ||
mockDataTopic.List.AppendSubtopicID("publicsectorfinance", Subtopic{ID: "3687", Slug: "publicsectorfinance", LocaliseKeyName: "Public Sector Finance", ReleaseDate: timeHelper("2022-10-10T08:30:00Z"), ParentID: "8268"}) | ||
mockDataTopic.List.AppendSubtopicID("internationalmigration", Subtopic{ID: "1234", Slug: "internationalmigration", LocaliseKeyName: "International Migration", ReleaseDate: timeHelper("2022-10-10T08:30:00Z")}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we've talked about the lack of need for the concept of 'DataTopic' here before.
cache/private/private_topic_test.go
Outdated
}) | ||
}) | ||
}) | ||
|
||
Convey("Given root topics exist but no topics found", t, func() { | ||
Convey("Given root topics exist but no data topics found", t, func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convey("Given root topics exist but no data topics found", t, func() { | |
Convey("Given root topics exist but no topics found", t, func() { |
cache/topic.go
Outdated
} | ||
|
||
func (tc *TopicCache) GetTopic(ctx context.Context, slug string) (*Subtopic, error) { | ||
dataTopicCache, err := tc.GetData(ctx, TopicCacheKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dataTopicCache, err := tc.GetData(ctx, TopicCacheKey) | |
topicCache, err := tc.GetData(ctx, TopicCacheKey) |
cache/topic.go
Outdated
} | ||
log.Error(ctx, "failed to get the data topic cache", err, logData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Error(ctx, "failed to get the data topic cache", err, logData) | |
log.Error(ctx, "failed to get the topic cache", err, logData) |
What
How to review
Check code is ok.
Who can review
Anyone, not me