File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 10
10
logging .basicConfig (level = logging .INFO ,
11
11
format = "%(asctime)s %(process)d %(message)s" )
12
12
13
+ BLOCKS_PER_DAY = 7200
14
+
13
15
class BalanceDailyMapShovel (ShovelBaseClass ):
14
16
table_name = "shovel_balance_daily_map"
15
17
@@ -18,6 +20,8 @@ def process_block(self, n):
18
20
19
21
20
22
def do_process_block (n , table_name ):
23
+ if n % BLOCKS_PER_DAY != 0 :
24
+ return
21
25
try :
22
26
# Create table if it doesn't exist
23
27
try :
Original file line number Diff line number Diff line change 11
11
logging .basicConfig (level = logging .INFO ,
12
12
format = "%(asctime)s %(process)d %(message)s" )
13
13
14
+ BLOCKS_PER_DAY = 7200
15
+
14
16
class StakeDailyMapShovel (ShovelBaseClass ):
15
17
table_name = "shovel_stake_daily_map"
16
18
@@ -19,6 +21,8 @@ def process_block(self, n):
19
21
20
22
21
23
def do_process_block (n , table_name ):
24
+ if n % BLOCKS_PER_DAY != 0 :
25
+ return
22
26
try :
23
27
# Create table if it doesn't exist
24
28
try :
You can’t perform that action at this time.
0 commit comments