

@celery.task()
def update_bugs():
    if settings.JIRA_INTEGRATION:
        for bug in Bug.objects.all():
            try:
                update_state(bug)
            except Exception as e:
                log.error('Unable to update bug {}: {}'.format(bug.externalId, bug))
    else:
        log.info('Jira integration is off. If you want to use this feature, turn it on.')

dataset/ETHPy150Open 2gis/badger-api/testreport/tasks.py update_bugs/VarMisuse@65/91 `e`->`bug`