Skip to content
Snippets Groups Projects
Commit 2672e7a7 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Wait some grace period between two subsequent transfers.

Closes #9
parent 4845e053
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@ namespace ATxService
private RoboCommand _roboCommand;
private long _txCurFileSize;
private int _txCurFileProgress;
private int _waitCyclesBeforeNextTx;
private DateTime _lastUserDirCheck = DateTime.MinValue;
......@@ -579,6 +580,14 @@ namespace ATxService
return;
}
// give the system some time before starting the next transfer:
if (_waitCyclesBeforeNextTx > 0) {
Log.Debug("Waiting {0} more cycles before starting the next transfer...",
_waitCyclesBeforeNextTx);
_waitCyclesBeforeNextTx--;
return;
}
// dispatch the next directory from "processing" for transfer:
try {
StartTransfer(subdirs[0].FullName);
......
......@@ -164,6 +164,7 @@ namespace ATxService
_txCurFileProgress = 0;
_roboCommand.Dispose();
_status.TransferInProgress = false;
_waitCyclesBeforeNextTx = 2;
}
/// <summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment