Skip to content
This repository has been archived by the owner on Oct 16, 2022. It is now read-only.

Commit

Permalink
Change logic for enabling sample stream
Browse files Browse the repository at this point in the history
  • Loading branch information
totetmatt committed Nov 22, 2019
1 parent e9e89cc commit ba5dd7f
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@ class TwitterStream(implicit materializer:ActorMaterializer) {
if(isRunning) {
stopStream()
}
this.searchQuery = searchQuery
if(searchQuery.isEmpty) {
if(sampleStream) {
twitterStream.sample()
}

if(sampleStream) {
twitterStream.sample()
} else {
this.searchQuery = searchQuery
twitterStream.filter(searchQuery:_*)
}
isRunning = true
Expand Down

0 comments on commit ba5dd7f

Please sign in to comment.