"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "panko/storage/impl_mongodb.py" between
panko-8.0.0.tar.gz and panko-8.1.0.tar.gz

About: OpenStack Panko is an event storage service and REST API for Ceilometer.
The "Ussuri" series (maintained release).

impl_mongodb.py  (panko-8.0.0):impl_mongodb.py  (panko-8.1.0)
skipping to change at line 98 skipping to change at line 98
[('event_type', pymongo.ASCENDING), [('event_type', pymongo.ASCENDING),
('timestamp', pymongo.ASCENDING)], ('timestamp', pymongo.ASCENDING)],
name='event_type_idx' name='event_type_idx'
) )
def clear(self): def clear(self):
self.conn.drop_database(self.db.name) self.conn.drop_database(self.db.name)
# Connection will be reopened automatically if needed # Connection will be reopened automatically if needed
self.conn.close() self.conn.close()
def clear_expired_data(self, ttl): def clear_expired_data(self, ttl, max_count=None):
"""Clear expired data from the backend storage system. """Clear expired data from the backend storage system.
Clearing occurs according to the time-to-live. Clearing occurs according to the time-to-live.
:param ttl: Number of seconds to keep records for. :param ttl: Number of seconds to keep records for.
:param max_count: Number of records to delete (not used for MongoDB).
""" """
self.update_ttl(ttl, 'event_ttl', 'timestamp', self.db.event) self.update_ttl(ttl, 'event_ttl', 'timestamp', self.db.event)
LOG.info("Clearing expired event data is based on native " LOG.info("Clearing expired event data is based on native "
"MongoDB time to live feature and going in background.") "MongoDB time to live feature and going in background.")
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)