def update_issue_digest(repo, number, always_put=False): digest = models.GHIssueDigest.make( repo, number, *classifier.classify_issue(repo, number)) if always_put: digest.put() else: models.save_if_newer(digest)
def update_issue_digest(repo, number, always_put=False): digest = models.GHIssueDigest.make(repo, number, *classifier.classify_issue(repo, number)) if always_put: digest.put() else: models.save_if_newer(digest)
def emit_classified(self, repo, number): try: self.response.write('<h3>Classifier Output</h3>') ret = classifier.classify_issue(repo, number) self.response.write('<ul><li>pr: %s<li>open: %s<li>involved: %s' % tuple(ret[:3])) self.response.write('<li>last_event_timestamp: %s' % ret[4]) self.response.write('<li>payload len: %d' %len(json.dumps(ret[3]))) self.response.write('<pre>%s</pre></ul>' % cgi.escape( json.dumps(ret[3], indent=2, sort_keys=True))) except BaseException: self.response.write('<pre>%s</pre>' % traceback.format_exc())