Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
abitmore committed Aug 8, 2022
1 parent 1758c79 commit 0ea89c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/plugins/es_objects/es_objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,12 @@ struct data_loader

// If no_delete or store_updates is true, do not delete
if( force_delete || !( opt.no_delete || opt.store_updates ) )
{
ilog( "Deleting all data in index " + my->_options.index_prefix + opt.index_name );
my->delete_all_from_database( opt );
}

ilog( "Loading data into index " + my->_options.index_prefix + opt.index_name );
db.get_index( ObjType::space_id, ObjType::type_id ).inspect_all_objects(
[this, &opt](const graphene::db::object &o) {
my->prepareTemplate( static_cast<const ObjType&>(o), opt );
Expand All @@ -184,6 +188,8 @@ void es_objects_plugin_impl::sync_db( bool delete_before_load )
loader.load<proposal_object >( _options.proposals, delete_before_load );
loader.load<limit_order_object >( _options.limit_orders, delete_before_load );
loader.load<budget_record_object >( _options.budget, delete_before_load );

ilog("elasticsearch OBJECTS: done loading data from the object database (chain state)");
}

void es_objects_plugin_impl::index_database(const vector<object_id_type>& ids, action_type action)
Expand Down

0 comments on commit 0ea89c6

Please sign in to comment.