Ejemplo n.º 1
0
def update_product(product, component=None):
    kwargs = {'product': product, 'scrum_only': False}
    if component:
        kwargs['component'] = component
    bug_ids = bugzilla.get_bug_ids(**kwargs)
    log.debug('Updating %d bugs from %s', len(bug_ids), kwargs)
    for bids in chunked(bug_ids, 100):
        update_bugs.delay(bids)
Ejemplo n.º 2
0
def update_product(product, component=None):
    kwargs = {'product': product, 'scrum_only': True}
    if component and component != ALL_COMPONENTS:
        kwargs['component'] = component
    bug_ids = bugzilla.get_bug_ids(**kwargs)
    log.debug('Updating %d bugs from %s', len(bug_ids), kwargs)
    for bids in chunked(bug_ids, 100):
        update_bugs.delay(bids)
Ejemplo n.º 3
0
def fetch_new_bugs():
    bug_ids = bugzilla.get_bug_ids()
    bug_ids = set(bug_ids)
    already_fetched_bugs = Bug.objects.only('id')
    already_fetched_bugs = [ b.id for b in already_fetched_bugs ]
    already_fetched_bugs = set(already_fetched_bugs)
    diff = bug_ids.difference(already_fetched_bugs)
    for bids in chunked(diff, 100):
        update_bugs.delay(bids)