forked from axiom-team/g1-stats
Fix cumulate.jq not found
This commit is contained in:
parent
e513ae477a
commit
7b32e5fa10
|
@ -241,7 +241,17 @@ scanTxWallets() {
|
|||
echo "]" >> $jsonFile
|
||||
|
||||
# On génère le JSON équivalent avec données cumulatives
|
||||
jq -f $GPATH/lib/cumulate.jq $jsonFile > $GPATH/db/cum-daily.json
|
||||
jqCumulate="def roundit: (.*100.0)+ 0.5|floor/100.0;
|
||||
[foreach .[] as \$row (null;
|
||||
.nbrMembers += \$row.nbrMembers |
|
||||
.nbrWallets += \$row.nbrWallets |
|
||||
.sMembers = (\$row.sMembers + .sMembers|roundit) |
|
||||
.rMembers = (\$row.rMembers + .rMembers|roundit) |
|
||||
.sWallets = (\$row.sWallets + .sWallets|roundit) |
|
||||
.rWallets = (\$row.rWallets + .rWallets|roundit);
|
||||
\$row + . )]"
|
||||
|
||||
jq "$jqCumulate" $jsonFile > $GPATH/db/cum-daily.json
|
||||
|
||||
# On supprime les doublons et les lignes vides
|
||||
wallets=$(echo -e "$wallets" | sort -u | awk 'NF')
|
||||
|
|
Loading…
Reference in New Issue