def checkIfPendingProcessesExist(mapObj, request):
    """ Checks if there are process in the database which are not yet processed and
        through this race condition exists.

        :type mapObj: vkviewer.python.models.vkdb.Map
        :type request: pyramid.request
        :return: bool """
    thereArePendingProcesses = False
    try:
        if Georeferenzierungsprozess.arePendingProcessForMapId(mapObj.id, request.db):
            thereArePendingProcesses =  True
    except ProcessIsInvalideException as e:
        # This exception catch the case that are right now no process process registered
        # in the database for the given mapObj id
        pass
    return thereArePendingProcesses
def checkIfPendingProcessesExist(mapObj, request):
    """ Checks if there are process in the database which are not yet processed and
        through this race condition exists.

        :type mapObj: vkviewer.python.models.vkdb.Map
        :type request: pyramid.request
        :return: bool """
    thereArePendingProcesses = False
    try:
        if Georeferenzierungsprozess.arePendingProcessForMapId(mapObj.id, request.db):
            thereArePendingProcesses =  True
    except ProcessIsInvalideException as e:
        # This exception catch the case that are right now no process process registered
        # in the database for the given mapObj id
        pass
    return thereArePendingProcesses