def notify_error(name, url, msg, content): logger.error('error in %s service: %s\nurl=%s\ncontent=%s' % (name, msg, url, content)) github_add_or_update_issue( 'monitor: error while fetching metadata for %s service' % name, "unexpected error while trying to fetch metadata for %s service\n\nurl=%s\n\nerror=%s\n\n%s" % (name, url, msg, content))
def notify_xml_changed(name, url, original, updated): logger.warning('xml changed in %s service\nurl=%s'%(name, url)) github_add_or_update_issue( "monitor: metadata changed for %s service"%name, "change detected in metadata of %s service\n\nurl=%s"%(name, url), { "updated.xml": {"content": updated}, "original.xml": {"content": original} } )
def notify_xml_changed(name, url, original, updated): logger.warning('xml changed in %s service\nurl=%s' % (name, url)) github_add_or_update_issue( "monitor: metadata changed for %s service" % name, "change detected in metadata of %s service\n\nurl=%s" % (name, url), { "updated.xml": { "content": updated }, "original.xml": { "content": original } })
def error_report(cls, short_title, msg, content=None): title = 'error in %s/%s: %s' % (cls._get_service_name(), cls._get_method_name(), short_title) if content is not None: content = {"content.txt": {"content": content}} github_add_or_update_issue(title, msg, content)
def error_report(cls, short_title, msg, content=None): title = 'error in %s/%s: %s' % ( cls._get_service_name(), cls._get_method_name(), short_title) if content is not None: content = {"content.txt": {"content": content}} github_add_or_update_issue(title, msg, content)
def notify_error(name, url, msg, content): logger.error('error in %s service: %s\nurl=%s\ncontent=%s'%(name,msg, url, content)) github_add_or_update_issue( 'monitor: error while fetching metadata for %s service'%name, "unexpected error while trying to fetch metadata for %s service\n\nurl=%s\n\nerror=%s\n\n%s"%(name, url, msg, content) )