def send(): report = reports.get() if report: if report.type == 1 and report.obj == "all": logger.info("post image") else: logger.info("sent report <%s>" % (report.report)) reports.archive(report.id) logger.info("archived job <%d %s>" % (report.id, report.action)) else: return None
def send(): report = reports.get() if report: #: is query all if report.type == 1 and report.obj == 'all': resp = upload_image(report.report, str(report.id), report.user.name) else: resp = repost(report.report, report.tweet_id) reports.archive(report.id) logger.info('archived job <%d %s>' % (report.id, report.action)) return resp else: return None
def send(self): report = reports.get() if report: if report.type == 1 and report.obj == 'all' or \ report.action == 'capture': resp = self.upload_image(report.report, str(report.id), report.user.name) else: resp = self.repost(report.report, report.tweet_id) reports.archive(report.id) logger.info('archived job <%d %s>' % (report.id, report.action)) return resp else: return None