Skip to content

Commit

Permalink
fli-iam#2321 - delete niftis
Browse files Browse the repository at this point in the history
- add lazy initialisation
  • Loading branch information
jcomedouteau authored and DuckflipXYZ committed Dec 6, 2024
1 parent 457465e commit f8f7b44
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
Expand Down Expand Up @@ -106,9 +107,11 @@ public class DatasetServiceImpl implements DatasetService {
private boolean dicomWeb;

@Autowired
@Lazy
private DatasetProcessingService processingService;

@Autowired
@Lazy
private ProcessingResourceService processingResourceService;

@Autowired
Expand Down Expand Up @@ -373,6 +376,7 @@ public List<Object[]> queryStatistics(String studyNameInRegExp, String studyName

@Override
@Async
@Transactional
public void deleteNiftis(Long studyId) {
List<Dataset> datasets = this.findByStudyId(studyId);
ShanoirEvent event = new ShanoirEvent(ShanoirEventType.DELETE_NIFTI_EVENT, studyId.toString(), KeycloakUtil.getTokenUserId(), "Preparing deletion of niftis", ShanoirEvent.IN_PROGRESS, 0, studyId);
Expand Down

0 comments on commit f8f7b44

Please sign in to comment.