pass in the type we want so it gets converted properly
This commit is contained in:
@@ -163,7 +163,8 @@ def schedule_delete_from_backend(uri, options, id, **kwargs):
|
||||
"""
|
||||
Given a uri and a time, schedule the deletion of an image.
|
||||
"""
|
||||
use_delay = config.get_option(options, 'delayed_delete', default=False)
|
||||
use_delay = config.get_option(options, 'delayed_delete', type='bool',
|
||||
default=False)
|
||||
if not use_delay:
|
||||
registry.update_image_metadata(options, id, {'status': 'deleted'})
|
||||
try:
|
||||
|
||||
@@ -51,6 +51,8 @@ class Server(object):
|
||||
class Scrubber(object):
|
||||
def __init__(self, options):
|
||||
self.options = options
|
||||
scrub_time = config.get_option(options, 'scrub_time', type='int',
|
||||
default=0)
|
||||
scrub_time = int(self.options.get('scrub_time', 0))
|
||||
self.scrub_time = datetime.timedelta(seconds=scrub_time)
|
||||
db_api.configure_db(options)
|
||||
|
||||
Reference in New Issue
Block a user