Skip to content

Commit

Permalink
[#118]: elapsed time to milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryuk authored Feb 17, 2024
1 parent 3fdd961 commit 1f585d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions natsjobs/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (c *Driver) Run(ctx context.Context, p jobs.Pipeline) error {

c.listenerStart()

c.log.Debug("pipeline was started", zap.String("driver", pipe.Driver()), zap.String("pipeline", pipe.Name()), zap.Time("start", start), zap.Duration("elapsed", time.Since(start)))
c.log.Debug("pipeline was started", zap.String("driver", pipe.Driver()), zap.String("pipeline", pipe.Name()), zap.Time("start", start), zap.Int64("elapsed", time.Since(start).Milliseconds()))
return nil
}

Expand Down Expand Up @@ -325,7 +325,7 @@ func (c *Driver) Pause(ctx context.Context, p string) error {

c.stopCh <- struct{}{}

c.log.Debug("pipeline was paused", zap.String("driver", pipe.Driver()), zap.String("pipeline", pipe.Name()), zap.Time("start", start), zap.Duration("elapsed", time.Since(start)))
c.log.Debug("pipeline was paused", zap.String("driver", pipe.Driver()), zap.String("pipeline", pipe.Name()), zap.Time("start", start), zap.Int64("elapsed", time.Since(start).Milliseconds()))

return nil
}
Expand Down Expand Up @@ -356,7 +356,7 @@ func (c *Driver) Resume(ctx context.Context, p string) error {

atomic.AddUint32(&c.listeners, 1)

c.log.Debug("pipeline was resumed", zap.String("driver", pipe.Driver()), zap.String("pipeline", pipe.Name()), zap.Time("start", start), zap.Duration("elapsed", time.Since(start)))
c.log.Debug("pipeline was resumed", zap.String("driver", pipe.Driver()), zap.String("pipeline", pipe.Name()), zap.Time("start", start), zap.Int64("elapsed", time.Since(start).Milliseconds()))

return nil
}
Expand Down Expand Up @@ -425,7 +425,7 @@ func (c *Driver) Stop(ctx context.Context) error {
}

c.conn.Close()
c.log.Debug("pipeline was stopped", zap.String("driver", pipe.Driver()), zap.String("pipeline", pipe.Name()), zap.Time("start", start), zap.Duration("elapsed", time.Since(start)))
c.log.Debug("pipeline was stopped", zap.String("driver", pipe.Driver()), zap.String("pipeline", pipe.Name()), zap.Time("start", start), zap.Int64("elapsed", time.Since(start).Milliseconds()))

return nil
}
Expand Down

0 comments on commit 1f585d8

Please sign in to comment.