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
b55ef5c2
Commit
b55ef5c2
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Make LimitReason part of the status.
parent
81596e45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AutoTx/AutoTx.cs
+6
-6
6 additions, 6 deletions
AutoTx/AutoTx.cs
AutoTx/SystemChecks.cs
+0
-1
0 additions, 1 deletion
AutoTx/SystemChecks.cs
AutoTx/XmlConfiguration.cs
+10
-0
10 additions, 0 deletions
AutoTx/XmlConfiguration.cs
with
16 additions
and
7 deletions
AutoTx/AutoTx.cs
+
6
−
6
View file @
b55ef5c2
...
...
@@ -419,8 +419,8 @@ namespace AutoTx
// all parameters within valid ranges, so set the state to "Running":
if
(
string
.
IsNullOrEmpty
(
limitReason
))
{
_serviceSuspended
=
false
;
if
(!
string
.
IsNullOrEmpty
(
_
la
stLimitReason
))
{
_
la
stLimitReason
=
""
;
// reset to force a message on next service suspend
if
(!
string
.
IsNullOrEmpty
(
_st
atus
.
LimitReason
))
{
_st
atus
.
LimitReason
=
""
;
// reset to force a message on next service suspend
writeLog
(
"Service resuming operation (all parameters in valid ranges)."
);
}
return
;
...
...
@@ -429,8 +429,8 @@ namespace AutoTx
// set state to "Running" if no-one is logged on:
if
(
NoUserIsLoggedOn
())
{
_serviceSuspended
=
false
;
if
(!
string
.
IsNullOrEmpty
(
_
la
stLimitReason
))
{
_
la
stLimitReason
=
""
;
// reset to force a message on next service suspend
if
(!
string
.
IsNullOrEmpty
(
_st
atus
.
LimitReason
))
{
_st
atus
.
LimitReason
=
""
;
// reset to force a message on next service suspend
writeLog
(
"Service resuming operation (no user logged on)."
);
}
return
;
...
...
@@ -438,10 +438,10 @@ namespace AutoTx
// by reaching this point we know the service should be suspended:
_serviceSuspended
=
true
;
if
(
limitReason
==
_
la
stLimitReason
)
if
(
limitReason
==
_st
atus
.
LimitReason
)
return
;
writeLog
(
"Service suspended due to limitiations ["
+
limitReason
+
"]."
);
_
la
stLimitReason
=
limitReason
;
_st
atus
.
LimitReason
=
limitReason
;
}
/// <summary>
...
...
This diff is collapsed.
Click to expand it.
AutoTx/SystemChecks.cs
+
0
−
1
View file @
b55ef5c2
...
...
@@ -9,7 +9,6 @@ namespace AutoTx
{
#
region
global
variables
private
string
_lastLimitReason
;
// TODO: this should be part of _status!
private
bool
_serviceSuspended
;
// TODO: this should be part of _status!
#
endregion
...
...
This diff is collapsed.
Click to expand it.
AutoTx/XmlConfiguration.cs
+
10
−
0
View file @
b55ef5c2
...
...
@@ -122,6 +122,7 @@ namespace AutoTx
private
DateTime
_lastStorageNotification
;
private
DateTime
_lastAdminNotification
;
private
string
_limitReason
;
string
_currentTransferSrc
;
string
_currentTargetTmp
;
...
...
@@ -154,6 +155,15 @@ namespace AutoTx
}
}
public
string
LimitReason
{
get
{
return
_limitReason
;
}
set
{
_limitReason
=
value
;
log
(
"LimitReason was updated ("
+
value
+
"), calling Serialize()..."
);
Serialize
();
}
}
public
string
CurrentTransferSrc
{
get
{
return
_currentTransferSrc
;
}
set
{
...
...
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