Move the projects long-polling loop into a separate module.