def run(self):
services = Service.objects.all()<EOL>for service in services:<EOL><INDENT>service_metric_sync.apply_async(<EOL>kwargs={"<STR_LIT>": str(service.id)})<EOL>key = "<STR_LIT>" % (<EOL>utils.normalise_string(service.name))<EOL>check = WidgetData.objects.filter(service=None, key=key)<EOL>if not check.exists():<EOL><INDENT>WidgetData.objects.create(<EOL>key=key,<EOL>title="<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT>return "<STR_LIT>" % services.count()<EOL>
Queues all services to be polled for metrics. Should be run via beat.