Skip to content

Commit

Permalink
Merge pull request #21 from fm-tibco/master
Browse files Browse the repository at this point in the history
fix time windows for aggregate activity
  • Loading branch information
Frank Martinez authored May 2, 2019
2 parents 077456f + 995c8b9 commit 01ce096
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activity/aggregate/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ func (a *Activity) createWindow(ctx activity.Context) (w window.Window, err erro
w, err = NewSlidingWindow(settings.Function, windowSettings)
case "timetumbling":
w, err = NewTumblingTimeWindow(settings.Function, windowSettings)
if err != nil && timerSupported {
if err == nil && timerSupported {
err = timerSupport.CreateTimer(time.Duration(settings.WindowSize)*time.Millisecond, a.moveWindow, true)
}
case "timesliding":
w, err = NewSlidingTimeWindow(settings.Function, windowSettings)
if err != nil && timerSupported {
if err == nil && timerSupported {
err = timerSupport.CreateTimer(time.Duration(settings.Resolution)*time.Millisecond, a.moveWindow, true)
}
default:
Expand Down

0 comments on commit 01ce096

Please sign in to comment.