Fixes test
Events: Use bisect to ensure task index and worker heartbeats are sorted