chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the clone-and-hack database initialisation from web scripts
[ypp-sc-tools.db-live.git]
/
yarrg
/
commod-results-processor
diff --git
a/yarrg/commod-results-processor
b/yarrg/commod-results-processor
index 7cd4e0457b6f438398ffa55f46dcdb035d834ed7..bb0724d0d81e0c26204152879d45f605a7b64c1e 100755
(executable)
--- a/
yarrg/commod-results-processor
+++ b/
yarrg/commod-results-processor
@@
-135,10
+135,12
@@
sub main__arbitrage () {
sub arb_subtract_qty (\@) {
my ($verbs) = @_;
my $verb= shift @$verbs;
sub arb_subtract_qty (\@) {
my ($verbs) = @_;
my $verb= shift @$verbs;
+ my $vqty= $verb->{Qty};
+ $vqty =~ s/^\>//;
unshift @$verbs, {
Stall => $verb->{Stall},
Price => $verb->{Price},
unshift @$verbs, {
Stall => $verb->{Stall},
Price => $verb->{Price},
- Qty => $v
erb->{Qty}
- $qty
+ Qty => $v
qty
- $qty
};
}
arb_subtract_qty(@buys);
};
}
arb_subtract_qty(@buys);
@@
-429,15
+431,14
@@
sub gzip ($) {
return pipethrough_run($tf,undef,'gzip','gzip');
}
return pipethrough_run($tf,undef,'gzip','gzip');
}
-sub main__uploadya
a
rg () {
+sub main__uploadya
r
rg () {
my %o;
parse_info_clientside();
$o{'ocean'}= $ENV{'YPPSC_OCEAN'} or die;
$o{'island'}= $ENV{'YPPSC_ISLAND'} or die;
my %o;
parse_info_clientside();
$o{'ocean'}= $ENV{'YPPSC_OCEAN'} or die;
$o{'island'}= $ENV{'YPPSC_ISLAND'} or die;
- $o{'timestamp'}= 10;
- get_our_version(\%o, 'client');
+ $o{'timestamp'}= $ENV{'YPPSC_DATA_TIMESTAMP'} or die;
my $tf= pipethrough_prep();
write_tsv($tf);
my $tf= pipethrough_prep();
write_tsv($tf);
@@
-446,10
+447,10
@@
sub main__uploadyaarg () {
Content_Type => 'application/octet-stream',
Content => $oz ];
Content_Type => 'application/octet-stream',
Content => $oz ];
- my $dest= $ENV{'YPPSC_YARRG_YARRG'};
-
- my $respcontent= cgipostform($ua, "$dest/commod-update-receiver", \%o);
+ my $respcontent= yarrgpostform($ua, \%o);
$respcontent =~ m/^OK\b/ or die "$respcontent ?";
$respcontent =~ m/^OK\b/ or die "$respcontent ?";
+ $respcontent =~ s/^/ /mg;
+ print $respcontent,"\n";
}
sub main__uploadpctb () {
}
sub main__uploadpctb () {