Skip to content

Commit

Permalink
only expire active errands due to TTL (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoghaddam385 authored Oct 20, 2021
1 parent 8f15175 commit 3c5fbcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion errands-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *ErrandsServer) periodicallyCheckTTLs() {
defer t.Stop()

filter := func(errand *schemas.Errand) bool {
if errand.Options.TTL <= 0 {
if errand.Options.TTL <= 0 || errand.Status != schemas.StatusActive {
return false
}

Expand Down

0 comments on commit 3c5fbcd

Please sign in to comment.