Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
c46fcbd9
Commit
c46fcbd9
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Rename FilecopyFinished to TransferInProgress and invert boolean.
parent
ef210f24
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AutoTx/AutoTx.cs
+5
-5
5 additions, 5 deletions
AutoTx/AutoTx.cs
AutoTx/RoboCommand.cs
+2
-2
2 additions, 2 deletions
AutoTx/RoboCommand.cs
AutoTx/XmlWrapper/ServiceStatus.cs
+5
-5
5 additions, 5 deletions
AutoTx/XmlWrapper/ServiceStatus.cs
with
12 additions
and
12 deletions
AutoTx/AutoTx.cs
+
5
−
5
View file @
c46fcbd9
...
...
@@ -256,7 +256,7 @@ namespace AutoTx
writeLogDebug
(
"------ Loaded status flags ------"
);
writeLogDebug
(
"CurrentTransferSrc: "
+
_status
.
CurrentTransferSrc
);
writeLogDebug
(
"CurrentTargetTmp: "
+
_status
.
CurrentTargetTmp
);
writeLogDebug
(
"
FilecopyFinished: "
+
_status
.
FilecopyFinished
);
writeLogDebug
(
"
TransferInProgress: "
+
_status
.
TransferInProgress
);
writeLogDebug
(
"LastStorageNotification: "
+
_status
.
LastStorageNotification
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
writeLogDebug
(
"LastAdminNotification: "
+
...
...
@@ -358,7 +358,7 @@ namespace AutoTx
catch
(
Exception
ex
)
{
writeLog
(
"Error terminating the RoboCopy process: "
+
ex
.
Message
,
true
);
}
_status
.
FilecopyFinished
=
fals
e
;
_status
.
TransferInProgress
=
tru
e
;
writeLog
(
"Not all files were transferred - will resume upon next start"
);
writeLogDebug
(
"CurrentTransferSrc: "
+
_status
.
CurrentTransferSrc
);
// should we delete an incompletely transferred file on the target?
...
...
@@ -654,7 +654,7 @@ namespace AutoTx
// only happens while all system parameters are within their valid ranges
// make sure the service is in an expected state before cleaning up:
if
(
_transferState
!=
TxState
.
Stopped
||
_status
.
FilecopyFinished
!=
true
)
if
(
_transferState
!=
TxState
.
Stopped
||
_status
.
TransferInProgress
)
return
;
if
(
_status
.
CurrentTargetTmp
.
Length
>
0
)
{
...
...
@@ -684,10 +684,10 @@ namespace AutoTx
// CONDITIONS (a transfer has to be resumed):
// - CurrentTargetTmp has to be non-empty
// - TransferState has to be "Stopped"
// -
FileCopyFinished
must be
fals
e
// -
TransferInProgress
must be
tru
e
if
(
_status
.
CurrentTargetTmp
.
Length
<=
0
||
_transferState
!=
TxState
.
Stopped
||
_status
.
FilecopyFinished
)
_status
.
TransferInProgress
==
false
)
return
;
writeLogDebug
(
"Resuming transfer from '"
+
_status
.
CurrentTransferSrc
+
...
...
This diff is collapsed.
Click to expand it.
AutoTx/RoboCommand.cs
+
2
−
2
View file @
c46fcbd9
...
...
@@ -27,7 +27,7 @@ namespace AutoTx
CreateNewDirectory
(
ExpandCurrentTargetTmp
(),
false
);
_transferState
=
TxState
.
Active
;
_status
.
FilecopyFinished
=
fals
e
;
_status
.
TransferInProgress
=
tru
e
;
try
{
// events
_roboCommand
.
OnCopyProgressChanged
+=
RsProgressChanged
;
...
...
@@ -136,7 +136,7 @@ namespace AutoTx
_transferState
=
TxState
.
Stopped
;
_roboCommand
.
Dispose
();
_roboCommand
=
new
RoboCommand
();
_status
.
FilecopyFinished
=
tru
e
;
_status
.
TransferInProgress
=
fals
e
;
}
/// <summary>
...
...
This diff is collapsed.
Click to expand it.
AutoTx/XmlWrapper/ServiceStatus.cs
+
5
−
5
View file @
c46fcbd9
...
...
@@ -17,7 +17,7 @@ namespace AutoTx.XmlWrapper
string
_currentTransferSrc
;
string
_currentTargetTmp
;
bool
_
filecopyFinished
;
bool
_
transferInProgress
;
private
bool
_serviceSuspended
;
private
bool
_cleanShutdown
;
...
...
@@ -83,10 +83,10 @@ namespace AutoTx.XmlWrapper
}
}
public
bool
FilecopyFinished
{
get
{
return
_
filecopyFinished
;
}
public
bool
TransferInProgress
{
get
{
return
_
transferInProgress
;
}
set
{
_
filecopyFinished
=
value
;
_
transferInProgress
=
value
;
log
(
"FilecopyFinished was updated ("
+
value
+
"), calling Serialize()..."
);
Serialize
();
}
...
...
@@ -115,7 +115,7 @@ namespace AutoTx.XmlWrapper
public
ServiceStatus
()
{
_currentTransferSrc
=
""
;
_currentTargetTmp
=
""
;
_
filecopyFinished
=
tru
e
;
_
transferInProgress
=
fals
e
;
}
public
void
Serialize
()
{
...
...
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