Skip to content

Commit

Permalink
ZFIN-9340: Fix paths for imports in perl files and fix warnings (ZFIN…
Browse files Browse the repository at this point in the history
…#1133)

* ZFIN-9340: Fix path for loading ZFINPerlModules.pm

* ZFIN-9340: Fix warnings:

- Unused variable
- my $dbhost declared twice
  • Loading branch information
rtaylorzfin authored Aug 22, 2024
1 parent fb392e0 commit 74e7660
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use DBI;
use Try::Tiny;
use FindBin;
use lib "$FindBin::Bin/../../";
use lib "$FindBin::Bin/../../../";
use ZFINPerlModules qw(assertEnvironment);
assertEnvironment('PGHOST', 'DB_NAME', 'ROOT_PATH', 'TARGETROOT');

Expand Down
2 changes: 1 addition & 1 deletion server_apps/data_transfer/PUBMED/Journal/mergeJournals.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use DBI;
use FindBin;
use lib "$FindBin::Bin/../../";
use lib "$FindBin::Bin/../../../";
use ZFINPerlModules qw(assertEnvironment);
assertEnvironment('PGHOST', 'DB_NAME', 'ROOT_PATH');

Expand Down
5 changes: 2 additions & 3 deletions server_apps/data_transfer/ResourceCenters/pullFromCZRC.pl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ($$)
if (system("/local/bin/wget http://www.zfish.cn/$filename")) {
&errorExit("Failed to download $filename file from CZRC."," See $wgetStatusFile for details.");
}
$labZdbId = "ZDB-LAB-130226-1";
# $labZdbId = "ZDB-LAB-130226-1";
}
if (-z $filename) {
&errorExit("Downloaded file $filename is empty. Aborting.",
Expand Down Expand Up @@ -138,7 +138,7 @@ ($$)
# Hard code the ZDB ID of ZIRC

my $czrcZdbId = "ZDB-LAB-130226-1";
my $labZdbId;
# my $labZdbId;
system("/bin/rm -f <!--|ROOT_PATH|-->/server_apps/data_transfer/ResourceCenters/loadReport.txt");

open(ZIRCREPORT, ">> <!--|ROOT_PATH|-->/server_apps/data_transfer/ResourceCenters/loadReport.txt") or die "can't open loadReport.txt";
Expand Down Expand Up @@ -167,7 +167,6 @@ ($$)
$dbh->commit();
$dbh->disconnect();

my $dbhost = "<!--|PGHOST|-->";
$dbh = DBI->connect ("DBI:Pg:dbname=$dbname;host=$dbhost", $username, $password)
or die "Cannot connect to PostgreSQL database: $DBI::errstr\n";

Expand Down

0 comments on commit 74e7660

Please sign in to comment.