Optimised sync_api management task.
Significantly improved running speed of tracker_cleanup management task.