Пример #1
0
def import_all(args):
    while True:
        items = ImportItem.find_pending()
        if not items:
            logger.info("No pending items found. sleeping for a minute.")
            time.sleep(60)

        for item in items:
            do_import(item)
Пример #2
0
def import_all(args):
    while True:
        items = ImportItem.find_pending()
        if not items:
            logger.info("No pending items found. sleeping for a minute.")
            time.sleep(60)

        for item in items:
            do_import(item)
Пример #3
0
def import_all(args, **kwargs):
    servername = kwargs.get('servername', None)
    while True:
        items = ImportItem.find_pending()
        if not items:
            logger.info("No pending items found. sleeping for a minute.")
            time.sleep(60)

        for item in items:
            do_import(item, servername=servername)
Пример #4
0
def import_all(args, **kwargs):
    servername = kwargs.get('servername')
    require_marc = not kwargs.get('no_marc', False)
    while True:
        items = ImportItem.find_pending()
        if not items:
            logger.info("No pending items found. sleeping for a minute.")
            time.sleep(60)

        for item in items:
            do_import(item, servername=servername, require_marc=require_marc)