Commit e9a3ea07 authored by Robert Butora's avatar Robert Butora
Browse files

cutout with doStream to file minors: adds better logging, moves...

cutout with doStream to file minors: adds better logging, moves db-hostname-configed check to Settings and sets servlet-config to legacy-vlkb
parent db459b28
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -45,6 +45,10 @@ uninstall:


# vlkb-devel site local
.PHONY: vlkb-devel
vlkb-devel: stop uninstall clean build install config start



.PHONY: config
config:
+4 −3
Original line number Diff line number Diff line
################################################################
# args
AMQP_QUEUE ?= vlkbdevel
# if amqp_host_name empty -> uses ExecCmd vlkb for cutout (not AMQP+vlkbd)

# localhost pasquale pasqule-devel
DBMS ?= localhost
# Resolver DB: <none> localhost pasquale pasqule-devel
# DBMS ?= localhost
# if <none> uses ResolverById

# test prod
#FITSDB ?= test
@@ -12,7 +14,6 @@ CONTEXT_ROOT ?= vlkb/datasets

# <empty> ia2token garrtoken basic
AUTH ?=
#NAUTHZ ?= anonymous

################################################################

+7 −7
Original line number Diff line number Diff line
@@ -9,21 +9,21 @@ default_spec_system=VELO_LSRK
# MIME-type of the response (only one of [1][2][3])

# [1]:
default_response_format=application/x-vlkb+xml
# default_response_format=application/fits

# [2]:
# default_response_format=application/fits;createfile=yes
# fits_path_cutouts=/srv/vlkb/cutouts
# amqp_host_name=localhost
# amqp_host_name=
# amqp_port=5672
# amqp_routing_key=AMQP_QUEUE

# [3]:
# default_response_format=application/x-vlkb+xml
# surveys_metadata_abs_pathname=/srv/vlkb/surveys/survey_populate.csv
# fits_path_cutouts=/srv/vlkb/cutouts
# fits_url_cutouts=http://localhost:8080/CONTEXT_ROOT/cutouts
# amqp_host_name=localhost
default_response_format=application/x-vlkb+xml
surveys_metadata_abs_pathname=/srv/vlkb/surveys/survey_populate.csv
fits_path_cutouts=/srv/vlkb/cutouts
fits_url_cutouts=http://vlkb-devel.ia2.inaf.it:8080/CONTEXT_ROOT/cutouts
# amqp_host_name=
# amqp_port=5672
# amqp_routing_key=AMQP_QUEUE

+1 −0
Original line number Diff line number Diff line
# DBMS=<empty> -> Resolver will attempt ResolverById
+6 −0
Original line number Diff line number Diff line
@@ -193,9 +193,13 @@ class CutoutImpl implements Cutout

         if(settings.amqpConn.isHostnameEmpty())
         {
            LOGGER.info("Using doStream() to local file");

            String absSubimgPathname = settings.fitsPaths.cutouts()
               + "/" + generateSubimgPathname(relPathname, hdunum);

            LOGGER.info("Uses local filename : " + absSubimgPathname);

            OutputStream fileOutputStream = new FileOutputStream( new File(absSubimgPathname) );

            doStream(relPathname, hdunum, pos, band, time, pol, fileOutputStream);
@@ -211,6 +215,8 @@ class CutoutImpl implements Cutout
         }
         else
         {
            LOGGER.info("Using AMQP");

            JsonEncoder jReq = new JsonEncoder();
            jReq.add(relPathname, hdunum);
            jReq.add(pos);
Loading