Prune non-waiting tasks from queue during distribution

Make the replication distributor also prune the tasks which have been
removed from the persistent waiting directory but that are still in the
queue. Since these tasks are not in the waiting directory, they will not
run once they could run anyway. Cleaning these tasks up gives a more
accurate picture of the replication work still needing to be done.
Presumably these tasks have been removed externally by another actor
(likely because they completed on another master in the cluster). This
keeps the scheduled and waiting lists approximately synchronized across
all the nodes in a multi-master cluster.

Change-Id: If99ed75041fa07632fdc0f23473dad4d8942a3e1
3 files changed
tree: 3179e6ed1eb830b3754e7fd752a9a1cfc5de0d1f
  1. .gitignore
  2. .mailmap
  3. .settings/
  4. BUILD
  5. LICENSE
  6. src/