[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [GT] trunk/GT/Tools.pm 2008-03-30 04:07:51 UTC (rev 594) or later
I am not sure why this disconnect causes problems, as at the end of the
routine find_calculator the access to the data base is completed.
However, if that remains an issue, we have to take the connect and
disconnect from the data base out of the find_calculator routine and
move it to be beginning and end of the scripts, respectively.
That might improve data base performance for the scripts hitting the db
multiple times, such as backtest_multi and backtest_many, as well as
scan.
Th.
> -----Original Message-----
> From: Robert A. Schmied [mailto:ras
AT
acm.org]
> Sent: Tuesday, April 29, 2008 2:46 PM
> To: devel
AT
geniustrader.org
> Subject: [GT] trunk/GT/Tools.pm 2008-03-30 04:07:51 UTC (rev 594) or
> later
>
> gt'ers
>
> if you are using a sql database, such as postgresql or mysql, and have
> upgraded
> from the gt svn repository you need to make the following change to
> GT/Tools.pm
> if the revision is between 594 and around 622 or so.
>
>
> in sub find_calculator comment out the line "$db->disconnect;" as
shown
> below:
>
>
> die($msg);
> }
>
> my $db = GT::Eval::create_db_object();
> my ($prices, $calc) = get_timeframe_data($code, $timeframe, $db,
> $max_loaded_items);
> # $db->disconnect;
>
> my $c = $prices->count;
> my $first;
>
>
>
> ras