fixed FetchPDF
This commit is contained in:
parent
b35cbb7fd8
commit
30a02fe94f
|
@ -126,16 +126,14 @@ public class GeoportalExporter {
|
||||||
if (userAgentName != null) {
|
if (userAgentName != null) {
|
||||||
LOG.info("Serving request as User-Agent {}", userAgentName);
|
LOG.info("Serving request as User-Agent {}", userAgentName);
|
||||||
final String pollingCode = ucdID + "_" + projectID + "_" + System.currentTimeMillis();
|
final String pollingCode = ucdID + "_" + projectID + "_" + System.currentTimeMillis();
|
||||||
|
final FetchPDF fetchPDF = new FetchPDF(null, pollingCode, 0);
|
||||||
|
map.put(pollingCode, fetchPDF);
|
||||||
try {
|
try {
|
||||||
Thread t = new Thread() {
|
Thread t = new Thread() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
LOG.info("exportAsPDF called in thread...");
|
LOG.info("exportAsPDF called in thread...");
|
||||||
FileReference pdfRef = null;
|
FileReference pdfRef = exportAsPDF(req, ucdID, projectID, null, context, user);
|
||||||
FetchPDF fetchPDF = new FetchPDF(pdfRef, pollingCode, 0);
|
|
||||||
map.put(pollingCode, fetchPDF);
|
|
||||||
|
|
||||||
pdfRef = exportAsPDF(req, ucdID, projectID, null, context, user);
|
|
||||||
LOG.info("exportAsPDF setFileRef in thread for code: " + pollingCode);
|
LOG.info("exportAsPDF setFileRef in thread for code: " + pollingCode);
|
||||||
fetchPDF.setFileRef(pdfRef);
|
fetchPDF.setFileRef(pdfRef);
|
||||||
map.put(pollingCode, fetchPDF);
|
map.put(pollingCode, fetchPDF);
|
||||||
|
|
Loading…
Reference in New Issue