Skip to content

Commit b225858

Browse files
authored
Merge pull request #9 from initia-labs/fix/chore
Fix/chore - fix null json and typo
2 parents fa59b26 + 589c205 commit b225858

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

informative-indexer/prunner/prunner.go

+5
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ func (p *Prunner) pruningTable(ctx context.Context, tableName string) error {
112112
if err != nil {
113113
return fmt.Errorf("DB: Failed to fetch rows to prune from table %s: %w", tableName, err)
114114
}
115+
// no rows to prune
116+
if len(rowsToPrune) == 0 {
117+
logger.Info().Msgf("Pruning not required for table %s: no rows to prune", tableName)
118+
return nil
119+
}
115120

116121
backupFileName := fmt.Sprintf("%s-%d.zip", p.config.BackupFilePrefix, time.Now().Unix())
117122
if err := backupToGCS(ctx, p.storageClient, p.config.BackupBucketName, tableName, backupFileName, rowsToPrune); err != nil {

informative-indexer/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ task__prune() {
6363
local chain=$1
6464

6565
if [ -z "$chain" ]; then
66-
echo "usage: $0 flush <chain>"
66+
echo "usage: $0 prune <chain>"
6767
exit
6868
fi
6969

0 commit comments

Comments
 (0)