コード例 #1
0
ファイル: cron.py プロジェクト: bensternthal/scrumbugz
def sync_bugmail():
    """
    Check bugmail for updated bugs, and get their data from Bugzilla.
    """
    bugids = get_bugmails()
    if bugids:
        numbugs = len(bugids)
        url = BugzillaURL(url=get_bz_url_for_bug_ids(bugids))
        try:
            url.get_bugs(open_only=False)
        except BZError:
            # error logged in `get_bugs`
            log.error('Failed to update bugs from email: %s', bugids)
            return
        if NEW_RELIC:
            newrelic.agent.record_custom_metric('Custom/Bugmails', numbugs)
        log.info('Synced %d bug(s) from email', numbugs)
コード例 #2
0
def sync_bugmail():
    """
    Check bugmail for updated bugs, and get their data from Bugzilla.
    """
    bugids = get_bugmails()
    if bugids:
        numbugs = len(bugids)
        url = BugzillaURL(url=get_bz_url_for_bug_ids(bugids))
        try:
            url.get_bugs(open_only=False)
        except BZError:
            # error logged in `get_bugs`
            log.error('Failed to update bugs from email: %s', bugids)
            return
        if NEW_RELIC:
            newrelic.agent.record_custom_metric('Custom/Bugmails', numbugs)
        log.info('Synced %d bug(s) from email', numbugs)
コード例 #3
0
ファイル: cron.py プロジェクト: willkg/scrumbugz
def sync_bugmail():
    """
    Check bugmail for updated bugs, and get their data from Bugzilla.
    """
    counter = 0
    bugids = get_bugmails()
    for slug, ids in bugids.items():
        counter += len(ids)
        url = BugzillaURL(url=get_bz_url_for_bug_ids(ids))
        proj = None
        if slug:
            try:
                proj = Project.objects.get(slug=slug)
            except Project.DoesNotExist:
                pass
        if proj:
            url.project = proj
        url.get_bugs()
        sys.stdout.write('.')
        sys.stdout.flush()
    if counter:
        print "\nSynced {0} bugs".format(counter)
コード例 #4
0
ファイル: __init__.py プロジェクト: stxnext/scrumbugz
 def get_bz_search_url(self):
     """
     Return a url for the list of bugs in this QS.
     :return: str
     """
     return get_bz_url_for_bug_ids(self.all().values_list('id', flat=True))
コード例 #5
0
ファイル: models.py プロジェクト: protohub/scrumbugz
 def get_bz_search_url(self):
     """
     Return a url for the list of bugs in this QS.
     :return: str
     """
     return get_bz_url_for_bug_ids(self.all().values_list('id', flat=True))