"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "panko/cmd/storage.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).

storage.py  (panko-8.0.0):storage.py  (panko-8.1.0)
skipping to change at line 34 skipping to change at line 34
def dbsync(): def dbsync():
conf = service.prepare_service() conf = service.prepare_service()
storage.get_connection_from_config(conf).upgrade() storage.get_connection_from_config(conf).upgrade()
def expirer(): def expirer():
conf = service.prepare_service() conf = service.prepare_service()
if conf.database.event_time_to_live > 0: if conf.database.event_time_to_live > 0:
LOG.debug("Clearing expired event data") LOG.debug("Clearing expired event data")
conn = storage.get_connection_from_config(conf) conn = storage.get_connection_from_config(conf)
conn.clear_expired_data(conf.database.event_time_to_live) max_count = conf.database.events_delete_batch_size
try:
if max_count > 0:
conn.clear_expired_data(conf.database.event_time_to_live,
max_count)
else:
deleted = max_count = 100
while deleted and deleted > 0:
deleted = conn.clear_expired_data(
conf.database.event_time_to_live,
max_count)
except TypeError:
LOG.warning("Storage driver does not support "
"'events_delete_batch_size' config option.")
else: else:
LOG.info("Nothing to clean, database event time to live " LOG.info("Nothing to clean, database event time to live "
"is disabled") "is disabled")
 End of changes. 1 change blocks. 
1 lines changed or deleted 14 lines changed or added

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