Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
227120d7
Commit
227120d7
authored
13 years ago
by
tpylak
Browse files
Options
Downloads
Patches
Plain Diff
minor: better exception logging for post-registration tasks, formatting
SVN: 23549
parent
bf1e9ad2
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datastore_server/source/java/ch/systemsx/cisd/etlserver/postregistration/PostRegistrationMaintenanceTask.java
+21
-16
21 additions, 16 deletions
...ver/postregistration/PostRegistrationMaintenanceTask.java
with
21 additions
and
16 deletions
datastore_server/source/java/ch/systemsx/cisd/etlserver/postregistration/PostRegistrationMaintenanceTask.java
+
21
−
16
View file @
227120d7
...
...
@@ -49,28 +49,31 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TrackingDataSetCriteria
/**
* Maintenance task performing {@link IPostRegistrationTask}s.
*
*
* @author Franz-Josef Elmer
*/
public
class
PostRegistrationMaintenanceTask
implements
IDataStoreLockingMaintenanceTask
{
@Private
static
final
String
POST_REGISTRATION_TASKS_PROPERTY
=
"post-registration-tasks"
;
@Private
static
final
String
IGNORE_DATA_SETS
=
"ignore-data-sets-before-date"
;
@Private
static
final
String
LAST_SEEN_DATA_SET_FILE_PROPERTY
=
"last-seen-data-set-file"
;
@Private
static
final
String
POST_REGISTRATION_TASKS_PROPERTY
=
"post-registration-tasks"
;
@Private
static
final
String
IGNORE_DATA_SETS
=
"ignore-data-sets-before-date"
;
@Private
static
final
String
LAST_SEEN_DATA_SET_FILE_PROPERTY
=
"last-seen-data-set-file"
;
private
static
final
String
DEFAULT_LAST_SEEN_DATA_SET_FILE
=
"last-seen-data-set.txt"
;
private
static
final
Logger
operationLog
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
PostRegistrationMaintenanceTask
.
class
);
private
static
final
Logger
operationLog
=
LogFactory
.
getLogger
(
LogCategory
.
OPERATION
,
PostRegistrationMaintenanceTask
.
class
);
private
IEncapsulatedOpenBISService
service
;
private
boolean
needsLockOnDataStore
;
private
Set
<
Entry
<
String
,
IPostRegistrationTask
>>
tasks
;
private
File
lastSeenDataSetFile
;
private
File
newLastSeenDataSetFile
;
...
...
@@ -115,12 +118,13 @@ public class PostRegistrationMaintenanceTask implements IDataStoreLockingMainten
String
property
=
properties
.
getProperty
(
IGNORE_DATA_SETS
);
if
(
property
==
null
)
{
ignoreBeforeDate
=
new
Date
(
0
);
ignoreBeforeDate
=
new
Date
(
0
);
}
else
{
try
{
ignoreBeforeDate
=
DateUtils
.
parseDate
(
property
,
new
String
[]
{
"yyyy-MM-dd"
});
ignoreBeforeDate
=
DateUtils
.
parseDate
(
property
,
new
String
[]
{
"yyyy-MM-dd"
});
}
catch
(
ParseException
ex
)
{
throw
new
ConfigurationFailureException
(
"Invalid value of property '"
...
...
@@ -150,6 +154,7 @@ public class PostRegistrationMaintenanceTask implements IDataStoreLockingMainten
saveLastSeenDataSetId
(
dataSet
.
getId
());
}
catch
(
Throwable
ex
)
{
operationLog
.
error
(
"Post registration failed."
,
ex
);
logPostponingMessage
(
dataSets
,
i
);
break
;
}
...
...
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