class ObjectExpirer(SwiftObjectExpirer):

    def __init__(self, conf, logger=None, swift=None):

        conf_path = conf.get('__file__') or '/etc/swift/object-expirer.conf'
        self.devices = conf.get('devices', '/mnt/gluster-object')
        # Do not retry DELETEs on getting 404. Hence default is set to 1.
        request_tries = int(conf.get('request_tries') or 1)
        # Use our extended version of InternalClient
        swift = GlusterSwiftInternalClient(
            conf_path, 'Gluster Swift Object Expirer', request_tries,
            devices=self.devices)
        # Let the parent class initialize self.swift
        super(ObjectExpirer, self).__init__(conf, logger=logger, swift=swift)

        self.reseller_prefix = conf.get('reseller_prefix', 'AUTH').strip()
        if not self.reseller_prefix.endswith('_'):
            self.reseller_prefix = self.reseller_prefix + '_'

        # nthread=0 is intentional. This ensures that no green pool is
        # used. Call to force_run_in_thread() will ensure that the method
        # passed as arg is run in a real external thread using eventlet.tpool
        # which has a threadpool of 20 threads (default)
        self.threadpool = ThreadPool(nthreads=0)

    def pop_queue(self, container, obj):
        """
        In Swift, this method removes tracker object entry directly from
        container database. In gluster-swift, this method deletes tracker
        object directly from filesystem.
        """
        container_path = os.path.join(self.devices,
                                      self.expiring_objects_account,
                                      container)
        self.threadpool.force_run_in_thread(delete_tracker_object,
                                            container_path, obj)

    def delete_actual_object(self, actual_obj, timestamp):
        """
        Swift's expirer will re-attempt expiring if the source object is not
        available (404 or ANY other error) up to self.reclaim_age seconds
        before it gives up and deletes the entry in the queue.

        Don't do this in gluster-swift. GlusterFS isn't eventually consistent
        and has no concept of hand-off nodes. If actual data object doesn't
        exist (404), remove tracker object from the queue (filesystem).

        However if DELETE fails due a reason other than 404, do not remove
        tracker object yet, follow Swift's behaviour of waiting till
        self.reclaim_age seconds.

        This method is just a wrapper around parent class's method. All this
        wrapper does is ignore 404 failures.
        """
        try:
            super(ObjectExpirer, self).delete_actual_object(
                actual_obj, timestamp)
        except UnexpectedResponse as err:
            if err.resp.status_int != HTTP_NOT_FOUND:
                raise