Skip to content

Commit

Permalink
Ajuste do script de importação.
Browse files Browse the repository at this point in the history
  • Loading branch information
tharlestsa committed Sep 27, 2024
1 parent 5e7e6c4 commit 4ccd648
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/server/bin/import_points.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var finalYear = (process.argv[7] == null) ? 2020 : process.argv[7];

var collectionPointsName = "points";
var collectionCampaignName = "campaign";
var dbUrl = 'mongodb://172.18.0.6:27017/tvi';
var dbUrl = process.env.MONGO_URL;

var checkError = function(error) {
if(error) {
Expand Down Expand Up @@ -163,6 +163,11 @@ var insertCampaing = function(db) {

fs.readFile(geojsonFile, 'utf-8', function(error, geojsonDataStr){
checkError(error);

if(dbUrl === '' || dbUrl === undefined || !dbUrl){
console.error("informe a URL do banco de dados.")
return;
}

getDB(dbUrl, function(db) {

Expand Down
1 change: 0 additions & 1 deletion src/server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module.exports = function(app) {
"langDir": appRoot + "/lang",
"logDir": appRoot + "/log/",
"imgDir": appRoot + "/images/",
// "imgDir": "/home/tharles/tvi-imgs",
"imgGDALTmpDir": "/var/tmp/gdalwmscache",
"imgDownloadCmd": appRoot + "/bin/download_image.sh",
"imgDownloadWmsCmd": appRoot + "/bin/download_image_wms.sh",
Expand Down

0 comments on commit 4ccd648

Please sign in to comment.