src/session/heartbeat/heartbeat.ts
This service defines the heartbeat interval that causes heartbeat events to be sent to the Runtime in order for the session to stay available.
The default implementation emits on a regular interval of one minute, that is interrupted whenever other kind of network activity takes place for the session. This ensures that no heartbeat events are sent when the user is interacting with the session. This interval will also be stopped once the session is known to have expired.
To change the session heartbeat interval, you may choose to override the SessionHeartbeat provider with a custom implementation. If you only need to adjust the trigger moments, consider extending PeriodicSessionHeartbeat class and only overriding the triggerMoments method. Please be aware that the interval of heartbeat events also influences the frequency of determining if the session has expired, if no other activity is taking place.
Methods |
|
Abstract triggers | ||||||
triggers(session: Session)
|
||||||
Returns an observable that emits when the heartbeat needs to occur. Special care needs to been taken to exclude the long-running interval from preventing Protractor from thinking Angular is ready.
Parameters :
Returns :
Observable<void>
|