@@ -3314,6 +3314,7 @@ public int nextStep() {
3314
3314
final var acquisition = isAcquisition (_currentTransfer );
3315
3315
final var currentTime = System .currentTimeMillis ();
3316
3316
final var expiryTime = _currentTransfer .getExpiryTime ().getTime ();
3317
+ final var currentStatus = _currentTransfer .getUserStatus ();
3317
3318
if (!StatusFactory .EXEC .equals (status ) && expiryTime < currentTime ) {
3318
3319
_log .info ("Stopping DataTransfer " + _currentTransfer .getId () + " (expired)" );
3319
3320
_currentTransfer .setStatusCode (StatusFactory .FAIL );
@@ -3325,38 +3326,31 @@ public int nextStep() {
3325
3326
return NEXT_STEP_CONTINUE ;
3326
3327
}
3327
3328
if (StatusFactory .RETR .equals (status ) && acquisition ) {
3328
- final var currentStatus = _currentTransfer .getUserStatus ();
3329
- if (isNotEmpty (currentStatus )) {
3330
- // The retry was triggered by a user action (e.g. requeue)
3331
- // Make sure it will not be triggered again unless the file
3332
- // is already on the data movers!
3333
- _currentTransfer .setUserStatus (null );
3334
- } else // Was this file already downloaded by the
3335
- // DownloadScheduler?
3336
- if (!_currentTransfer .getDataFile ().getDownloaded ()) {
3337
- // The file was not downloaded so the source acquisition
3338
- // Host was configured to not retrieve the file on the
3339
- // data movers.
3340
- final Host host = getHost ();
3341
- if (host == null || !HOST_ACQUISITION .getECtransSetup (host .getData ())
3342
- .getBoolean (HOST_ACQUISITION_REQUEUE_ON_FAILURE )) {
3343
- // In this case we don't want to restart
3344
- // the transmission as it should be forced only by a
3345
- // re-queue from the acquisition Destination!
3346
- _log .info ("Cancelling retry for DataTransfer " + _currentTransfer .getId ()
3347
- + " (not found on remote site)" );
3348
- _currentTransfer .setStatusCode (StatusFactory .FAIL );
3349
- // The original error was already set in the comment in
3350
- // the last history message!
3351
- _currentTransfer .setComment (
3352
- "No automatic retry (manual requeue or rediscovery from Acquisition Scheduler required)" );
3353
- _currentTransfer .setFinishTime (new Timestamp (System .currentTimeMillis ()));
3354
- MASTER .addTransferHistory (_currentTransfer );
3355
- _setLastFailedTransfer (_currentTransfer );
3356
- _update (_currentTransfer , true );
3357
- return NEXT_STEP_CONTINUE ;
3358
- }
3359
- }
3329
+ // Was this file already downloaded by the DownloadScheduler?
3330
+ if (!isNotEmpty (currentStatus ) && !_currentTransfer .getDataFile ().getDownloaded ()) {
3331
+ // The file was not downloaded so the source acquisition
3332
+ // Host was configured to not retrieve the file on the
3333
+ // data movers.
3334
+ final Host host = getHost ();
3335
+ if (host == null || !HOST_ACQUISITION .getECtransSetup (host .getData ())
3336
+ .getBoolean (HOST_ACQUISITION_REQUEUE_ON_FAILURE )) {
3337
+ // In this case we don't want to restart
3338
+ // the transmission as it should be forced only by a
3339
+ // re-queue from the acquisition Destination!
3340
+ _log .info ("Cancelling retry for DataTransfer " + _currentTransfer .getId ()
3341
+ + " (not found on remote site)" );
3342
+ _currentTransfer .setStatusCode (StatusFactory .FAIL );
3343
+ // The original error was already set in the comment in
3344
+ // the last history message!
3345
+ _currentTransfer .setComment (
3346
+ "No automatic retry (manual requeue or rediscovery from Acquisition Scheduler required)" );
3347
+ _currentTransfer .setFinishTime (new Timestamp (System .currentTimeMillis ()));
3348
+ MASTER .addTransferHistory (_currentTransfer );
3349
+ _setLastFailedTransfer (_currentTransfer );
3350
+ _update (_currentTransfer , true );
3351
+ return NEXT_STEP_CONTINUE ;
3352
+ }
3353
+ }
3360
3354
}
3361
3355
final var maxStart = _destination .getMaxStart ();
3362
3356
final var queueTime = _currentTransfer .getQueueTime ().getTime ();
@@ -3405,10 +3399,15 @@ public int nextStep() {
3405
3399
var retry = false ;
3406
3400
if (StatusFactory .RETR .equals (_currentTransfer .getStatusCode ())) {
3407
3401
_destinationStep = DestinationStep .DESTINATION_STEP_PROCESS_RETR ;
3408
- _log .info ("Retrying DataTransfer " + _currentTransfer .getId ());
3409
3402
if ((_currentTransfer .getHost () != null ) && (!_provider .next (_currentTransfer ) || !isRunning ())) {
3410
3403
return NEXT_STEP_CONTINUE ;
3411
3404
}
3405
+ _log .info ("Retrying DataTransfer " + _currentTransfer .getId ());
3406
+ if (isNotEmpty (currentStatus ) && acquisition )
3407
+ // The retry was triggered by a user action (e.g. re-queue)
3408
+ // Make sure it will not be triggered again unless the file
3409
+ // is already on the data movers!
3410
+ _currentTransfer .setUserStatus (null );
3412
3411
_currentTransfer .setStatusCode (StatusFactory .WAIT );
3413
3412
_currentTransfer .setFinishTime (null );
3414
3413
_currentTransfer .setComment (null );
0 commit comments