From 9108ee54f19d0f77610cc477b9f46b0f4600d2c3 Mon Sep 17 00:00:00 2001 From: ice-myles <96409608+ice-myles@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:13:34 +0300 Subject: [PATCH] Removed dry run DDL and backup model struct. --- miner/.testdata/DDL.sql | 30 ------------------------------ miner/miner.go | 1 - model/model.go | 3 --- 3 files changed, 34 deletions(-) delete mode 100644 miner/.testdata/DDL.sql diff --git a/miner/.testdata/DDL.sql b/miner/.testdata/DDL.sql deleted file mode 100644 index 42204d4..0000000 --- a/miner/.testdata/DDL.sql +++ /dev/null @@ -1,30 +0,0 @@ --- SPDX-License-Identifier: ice License 1.0 ---************************************************************************************************************************************ --- balance_recalculation_metrics -DROP TABLE IF EXISTS balance_recalculation_metrics; -CREATE TABLE IF NOT EXISTS balance_recalculation_metrics ( - started_at timestamp NOT NULL, - ended_at timestamp NOT NULL, - t1_balance_positive DOUBLE PRECISION NOT NULL, - t1_balance_negative DOUBLE PRECISION NOT NULL, - t2_balance_positive DOUBLE PRECISION NOT NULL, - t2_balance_negative DOUBLE PRECISION NOT NULL, - t1_active_counts_positive BIGINT NOT NULL, - t1_active_counts_negative BIGINT NOT NULL, - t2_active_counts_positive BIGINT NOT NULL, - t2_active_counts_negative BIGINT NOT NULL, - iterations_num BIGINT NOT NULL, - affected_users BIGINT NOT NULL, - worker BIGINT NOT NULL PRIMARY KEY - ) WITH (fillfactor = 70); ---************************************************************************************************************************************ --- balance_recalculation_dry_run -DROP TABLE IF EXISTS balance_recalculation_dry_run; -CREATE TABLE IF NOT EXISTS balance_recalculation_dry_run ( - diff_t1_balance DOUBLE PRECISION NOT NULL, - diff_t2_balance DOUBLE PRECISION NOT NULL, - diff_t1_active_counts DOUBLE PRECISION NOT NULL, - diff_t2_active_counts DOUBLE PRECISION NOT NULL, - user_id text PRIMARY KEY - ) WITH (fillfactor = 70); ---************************************************************************************************************************************ diff --git a/miner/miner.go b/miner/miner.go index 65188ce..c2841f0 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -271,7 +271,6 @@ func (m *miner) mine(ctx context.Context, workerNumber int64) { t0Referrals[ref.ID] = ref } } - shouldSynchronizeBalance := shouldSynchronizeBalanceFunc(uint64(batchNumber)) for _, usr := range userResults { if usr.UserID == "" { diff --git a/model/model.go b/model/model.go index abc36d4..1d83f8a 100644 --- a/model/model.go +++ b/model/model.go @@ -246,9 +246,6 @@ type ( KYCStepBlockedField struct { KYCStepBlocked users.KYCStep `json:"kycStepBlocked" redis:"kyc_step_blocked"` } - DeserializedBackupUsersKey struct { - ID int64 `redis:"-"` - } ) func (k *DeserializedUsersKey) Key() string {