fix the data writing to ES during sync issues
This commit is contained in:
parent
bfa878f9b2
commit
0a90442966
2 changed files with 39 additions and 3 deletions
|
|
@ -75,6 +75,7 @@ class elasticsearch_plugin_impl
|
|||
std::string bulk_line;
|
||||
std::string index_name;
|
||||
bool is_sync = false;
|
||||
fc::time_point last_sync;
|
||||
private:
|
||||
bool add_elasticsearch( const account_id_type account_id, const optional<operation_history_object>& oho, const uint32_t block_number );
|
||||
const account_transaction_history_object& addNewEntry(const account_statistics_object& stats_obj,
|
||||
|
|
@ -192,10 +193,12 @@ bool elasticsearch_plugin_impl::update_account_histories( const signed_block& b
|
|||
|
||||
void elasticsearch_plugin_impl::checkState(const fc::time_point_sec& block_time)
|
||||
{
|
||||
if((fc::time_point::now() - block_time) < fc::seconds(30))
|
||||
fc::time_point current_time(fc::time_point::now());
|
||||
if(((current_time - block_time) < fc::seconds(30)) || (current_time - last_sync > fc::seconds(60)))
|
||||
{
|
||||
limit_documents = _elasticsearch_bulk_sync;
|
||||
is_sync = true;
|
||||
last_sync = current_time;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"initial_timestamp": "2019-05-14T18:47:51",
|
||||
"initial_timestamp": "2020-01-13T06:03:15",
|
||||
"max_core_supply": "1000000000000000",
|
||||
"initial_parameters": {
|
||||
"current_fees": {
|
||||
|
|
@ -307,6 +307,27 @@
|
|||
75,{}
|
||||
],[
|
||||
76,{}
|
||||
],[
|
||||
77,{
|
||||
"lottery_asset": 2000000,
|
||||
"price_per_kbyte": 10
|
||||
}
|
||||
],[
|
||||
78,{
|
||||
"fee": 0
|
||||
}
|
||||
],[
|
||||
79,{
|
||||
"fee": 0
|
||||
}
|
||||
],[
|
||||
80,{
|
||||
"fee": 0
|
||||
}
|
||||
],[
|
||||
81,{
|
||||
"fee": 2000000
|
||||
}
|
||||
]
|
||||
],
|
||||
"scale": 10000
|
||||
|
|
@ -352,7 +373,19 @@
|
|||
"maximum_tournament_start_time_in_future": 2419200,
|
||||
"maximum_tournament_start_delay": 604800,
|
||||
"maximum_tournament_number_of_wins": 100,
|
||||
"extensions": {}
|
||||
"extensions": {
|
||||
"min_bet_multiplier": 10100,
|
||||
"max_bet_multiplier": 10000000,
|
||||
"betting_rake_fee_percentage": 300,
|
||||
"live_betting_delay_time": 5,
|
||||
"sweeps_distribution_percentage": 200,
|
||||
"sweeps_distribution_asset": "1.3.0",
|
||||
"sweeps_vesting_accumulator_account": "1.2.0",
|
||||
"gpos_period": 15552000,
|
||||
"gpos_subperiod": 2592000,
|
||||
"gpos_period_start": 1601528400,
|
||||
"gpos_vesting_lockin_period": 2592000
|
||||
}
|
||||
},
|
||||
"initial_bts_accounts": [],
|
||||
"initial_accounts": [{
|
||||
|
|
|
|||
Loading…
Reference in a new issue