Module rugged.commands.lib.update_metadata

Expand source code
import sys
from rugged.lib.logger import get_logger
from rugged.lib.task_queue import run_task

log = get_logger()


def update_snapshot_metadata():
    """ Dispatch the task to update snapshot metadata. """
    result, message = run_task('snapshot-worker', 'update_snapshot_task')
    if result:
        log.info(message)
    else:
        log.error(message)
        error = "Failed to update snapshot metadata. "\
                "Check the logs for more detailed error reporting."
        sys.exit(error)


def update_timestamp_metadata():
    """ Dispatch the task to update timestamp metadata. """
    result, message = run_task('timestamp-worker', 'update_timestamp_task')
    if result:
        log.info(message)
    else:
        log.error(message)
        error = "Failed to update timestamp metadata. "\
                "Check the logs for more detailed error reporting."
        sys.exit(error)

Functions

def update_snapshot_metadata()

Dispatch the task to update snapshot metadata.

Expand source code
def update_snapshot_metadata():
    """ Dispatch the task to update snapshot metadata. """
    result, message = run_task('snapshot-worker', 'update_snapshot_task')
    if result:
        log.info(message)
    else:
        log.error(message)
        error = "Failed to update snapshot metadata. "\
                "Check the logs for more detailed error reporting."
        sys.exit(error)
def update_timestamp_metadata()

Dispatch the task to update timestamp metadata.

Expand source code
def update_timestamp_metadata():
    """ Dispatch the task to update timestamp metadata. """
    result, message = run_task('timestamp-worker', 'update_timestamp_task')
    if result:
        log.info(message)
    else:
        log.error(message)
        error = "Failed to update timestamp metadata. "\
                "Check the logs for more detailed error reporting."
        sys.exit(error)