Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
org.etsi.osl.metrico
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
OSL
code
org.etsi.osl.metrico
Commits
45fc7560
Commit
45fc7560
authored
2 months ago
by
George Tziavas
Browse files
Options
Downloads
Patches
Plain Diff
added synchronized to JobService methods
parent
feaeaef3
No related branches found
No related tags found
1 merge request
!8
Draft: 8-make-metrico-use-the-tmf-api-databse-tables
Pipeline
#12939
failed
2 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/etsi/osl/metrico/services/JobService.java
+4
-4
4 additions, 4 deletions
src/main/java/org/etsi/osl/metrico/services/JobService.java
with
4 additions
and
4 deletions
src/main/java/org/etsi/osl/metrico/services/JobService.java
+
4
−
4
View file @
45fc7560
...
...
@@ -43,7 +43,7 @@ public class JobService {
* @throws IllegalArgumentException if the job's start or end date is invalid
* @throws RejectedExecutionException if the job could not be scheduled
*/
public
Job
startJob
(
Runnable
task
,
Job
job
)
{
public
synchronized
Job
startJob
(
Runnable
task
,
Job
job
)
{
logger
.
debug
(
"Starting Job for MeasurementCollectionJob with ID {}."
,
job
.
getMeasurementCollectionJobRef
());
MeasurementCollectionJobMVO
mcjMVO
=
new
MeasurementCollectionJobMVO
();
...
...
@@ -89,7 +89,7 @@ public class JobService {
*
* @param job the job to be stopped
*/
public
void
stopJob
(
Job
job
)
{
public
synchronized
void
stopJob
(
Job
job
)
{
MeasurementCollectionJobMVO
mcjMVO
=
new
MeasurementCollectionJobMVO
();
...
...
@@ -128,7 +128,7 @@ public class JobService {
*
* @param measurementCollectionJobUuid the UUID of the Measurement Collection Job
*/
public
void
stopJob
(
String
measurementCollectionJobUuid
)
{
public
synchronized
void
stopJob
(
String
measurementCollectionJobUuid
)
{
Job
job
=
runningJobs
.
get
(
measurementCollectionJobUuid
);
if
(
job
!=
null
)
{
stopJob
(
job
);
...
...
@@ -142,7 +142,7 @@ public class JobService {
*
* <p>This method iterates over all jobs in the runningJobs map, stops each job, and then clears the map.</p>
*/
public
void
stopAllJobs
()
{
public
synchronized
void
stopAllJobs
()
{
for
(
Job
job
:
runningJobs
.
values
())
{
stopJob
(
job
);
}
...
...
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