Example #1
0
def cache_latest_values(*args, **options):
    """Celery task for cache_latest_values.

    Original from the cache_latest_values management command."""

    # Set host for lizard 5 multitenancy.
    if 'host' in options:
        set_host(options['host'])

    for ds in datasource.datasources_from_entrypoints():
        try:
            scripts.cache_latest_values(ds)
        except:
            logger.exception('skipping datasource {0}'.format(ds))
Example #2
0
def rebuild_jdbc_cache_task(*args, **options):
    """
    Rebuild filter cache for fewsjdbc.

    Options can be
        timeout
        deep
    """

    # Set the host for multitenant lizard5 sites
    if "host" in options:
        set_host(options["host"])

    logger = None
    rebuild_jdbc_cache(logger, *args, **options)
def search_twitter_task(*args, **options):
    # Set host for lizard 5 multitenancy.
    if 'host' in options:
        set_host(options['host'])
    search_twitter(*args, **options)