-
Notifications
You must be signed in to change notification settings - Fork 0
34 feature02 supervisor actor #44
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 188 191 +3
===========================================
Files 18 19 +1
Lines 699 731 +32
Branches 37 39 +2
===========================================
+ Hits 699 731 +32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…or-actor # Conflicts: # app/actors/SupervisorActor.java # app/actors/UserActor.java
| // static class QueryInfo { | ||
| // /** The Search model object containing query parameters and fetched results */ | ||
| // final Search search; | ||
| // | ||
| // /** Set of UserActors watching this query and expecting updates */ | ||
| // final Set<ActorRef<UserActor.Message>> watchers = new HashSet<>(); | ||
| // | ||
| // /** | ||
| // * Constructs a new QueryInfo with the specified parameters. | ||
| // * @author Luan Tran | ||
| // * @param query the search query string | ||
| // * @param sortBy the sort order for results | ||
| // * @param apiKey the News API key | ||
| // */ | ||
| // QueryInfo(String query, String sortBy, String apiKey) { | ||
| // this.search = new Search(query, sortBy, apiKey); | ||
| // } | ||
| // } |
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.
Remove this?
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.
Yes, just after Luan review this part
|
|
||
| pushUpdatesToClient(); | ||
| // After readability is computed, ask SentimentAnalyzerActor to score the latest search | ||
| if (!searchHistory.isEmpty()) { |
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.
Why is sentiment analysis being done in readability results?? This works, ill approve it because of lack of time but this absolutely should not be here
| latest.setSentiment(":-|"); | ||
| pushUpdatesToClient(); | ||
| } else { | ||
| AskPattern.ask( |
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.
Since both are actors, you should be using tell, not ask, but ok
| * Wrapper that holds a Search object and its watchers. | ||
| * @author Luan Tran | ||
| */ | ||
| // static class QueryInfo { |
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.
remove commented code
| * @return Behaviors.same() to continue with the same behavior | ||
| */ | ||
| private Behavior<Message> onFetchTick(FetchTick msg) { | ||
| /*private Behavior<Message> onFetchTick(FetchTick msg) { |
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.
remove comment
Create a supervisor actror, and a sentiment analyzer actor.