sherlockpipe.update.Updater

class sherlockpipe.update.Updater(cache_dir='/home/docs/')

Bases: object

This class should be used to download SHERLOCK data as objects of interest, ELEANOR or LATTE metadata. It stores timestamps to remind when was the last time it updated and if called again, it could do nothing if it reads very recent operations.

__init__(cache_dir='/home/docs/')

Initialize the updater with a cache directory.

Parameters

cache_dirstr, optional

Base directory for storing downloaded metadata. Defaults to the user home directory.

Methods

__init__([cache_dir])

Initialize the updater with a cache directory.

update(clean, ois, force)

The main method of the update task.

update(clean, ois, force)

The main method of the update task. Reloads OIs, ELEANOR and LATTE metadata.

Parameters:
  • clean – Specifies whether the ELEANOR data should be wiped and downloaded again.

  • ois – Specifies whether the OIs metadata is the only one to be refreshed (ignoring ELEANOR and LATTE)

  • force – Specifies whether the last download timestamp should be ignored and proceed as if a refresh was needed.