Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vlkb-soda
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ViaLactea
vlkb-soda
Commits
db866e95
Commit
db866e95
authored
1 month ago
by
Robert Butora
Browse files
Options
Downloads
Patches
Plain Diff
mcutout: improve logging when checking UploadFile-type in POST-body
parent
b9fd2417
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
data-access/servlet/src/main/java/mcutout/webapi/UWSMCutoutWork.java
+10
-14
10 additions, 14 deletions
.../servlet/src/main/java/mcutout/webapi/UWSMCutoutWork.java
with
10 additions
and
14 deletions
data-access/servlet/src/main/java/mcutout/webapi/UWSMCutoutWork.java
+
10
−
14
View file @
db866e95
...
...
@@ -68,16 +68,15 @@ public class UWSMCutoutWork extends JobThread
long
startTime_msec
=
System
.
currentTimeMillis
();
boolean
showDuration
=
true
;
logger
.
logThread
(
LogLevel
.
INFO
,
this
,
"
Is mcutout UploadFile type?"
,
"Is mcutout UploadFile type?"
,
null
);
logger
.
logThread
(
LogLevel
.
INFO
,
this
,
"
"
,
"Job started"
,
null
);
Object
obj
=
job
.
getAdditionalParameterValue
(
"mcutout"
);
if
(
obj
instanceof
UploadFile
)
{
logger
.
logThread
(
LogLevel
.
INFO
,
this
,
"mcutout is UploadFile"
,
"mcutout is UploadFile"
,
null
);
UploadFile
jsonFile
=
(
UploadFile
)
obj
;
//job.getAdditionalParameterValue("mcutout");
logger
.
logThread
(
LogLevel
.
INFO
,
this
,
""
,
"mcutout is UploadFile"
,
null
);
InputStreamReader
isr
=
new
InputStreamReader
(
jsonFile
.
open
());
UploadFile
jsonFile
=
(
UploadFile
)
obj
;
InputStreamReader
isr
=
new
InputStreamReader
(
jsonFile
.
open
()
);
BufferedReader
input
=
new
BufferedReader
(
isr
);
StringBuffer
jsonStringBuffer
=
new
StringBuffer
();
String
line
;
...
...
@@ -98,17 +97,13 @@ public class UWSMCutoutWork extends JobThread
publishOnEndpoint
(
"Report"
,
"application/json"
,
mresult
.
resJsonPathname
);
publishOnEndpoint
(
"mcutout.tar.gz"
,
"application/gzip"
,
mresult
.
fileName
);
// delete cut-files (were published/copied to uws-file store)
//mresult.deleteResJson();
//mresult.deleteCutFiles();
FileUtils
.
deleteDirectory
(
new
File
(
workDir
));
//FileUtils.deleteQuietly(new File(workDir));// FIXME Never throws except. leaves the dir there if error
}
else
{
// mcutout-json not in body
logger
.
logThread
(
LogLevel
.
INFO
,
this
,
""
,
"mcutout is NOT UploadFile type: wrong argument ? Nothing to do, exiting..."
,
null
);
}
/* FIXME here was uws-check is-job-Interrupted */
...
...
@@ -116,7 +111,8 @@ public class UWSMCutoutWork extends JobThread
catch
(
IOException
ex
)
{
logger
.
error
(
"MCutout error"
,
ex
);
throw
new
UWSException
(
"Internal error: jsonFile.open() throws IOException:"
+
ex
.
getMessage
());
throw
new
UWSException
(
"UploadFile::jsonFile.open() throws IOException:"
+
ex
.
getMessage
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment