def handle(self, *args, **options):
     for ds in datasource.datasources_from_entrypoints():
         print(ds)
         try:
             scripts.cache_latest_values(ds)
         except:
             logger.exception('skipping datasource {0}'.format(ds))
 def handle(self, *args, **options):
     for ds in datasource.datasources_from_entrypoints():
         try:
             scripts.cache_latest_values(
                 ds, allow_cache=(options['no_cache'] == False))
         except:
             logger.exception(
                 'Exception for datasource {0}, skipping it'.format(ds))
Beispiel #3
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))
 def handle(self, *args, **options):
     for ds in datasource.datasources_from_entrypoints():
         print(ds)
         scripts.cache_latest_values(ds)