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
a75b270d
Commit
a75b270d
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Use load indicator field from Cpu class
Refers to
#36
parent
5ee528c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ATxService/AutoTx.cs
+1
-4
1 addition, 4 deletions
ATxService/AutoTx.cs
with
1 addition
and
4 deletions
ATxService/AutoTx.cs
+
1
−
4
View file @
a75b270d
...
...
@@ -45,7 +45,6 @@ namespace ATxService
private
int
_txCurFileProgress
;
private
int
_waitCyclesBeforeNextTx
;
private
Cpu
_cpu
;
private
bool
_cpuLoadHigh
;
private
DateTime
_lastUserDirCheck
=
DateTime
.
MinValue
;
...
...
@@ -526,7 +525,6 @@ namespace ATxService
/// </summary>
private
void
OnLoadBelowLimit
(
object
sender
,
EventArgs
e
)
{
Log
.
Warn
(
"CPU load is below given limit."
);
_cpuLoadHigh
=
false
;
}
/// <summary>
...
...
@@ -534,7 +532,6 @@ namespace ATxService
/// </summary>
private
void
OnLoadAboveLimit
(
object
sender
,
EventArgs
e
)
{
Log
.
Warn
(
"High CPU load detected!"
);
_cpuLoadHigh
=
true
;
}
/// <summary>
...
...
@@ -545,7 +542,7 @@ namespace ATxService
// check all system parameters for valid ranges and remember the reason in a string
// if one of them is failing (to report in the log why we're suspended)
if
(
_cpuLoad
High
)
if
(
_cpu
.
High
Load
)
limitReason
=
"CPU usage"
;
else
if
(
SystemChecks
.
GetFreeMemory
()
<
_config
.
MinAvailableMemory
)
limitReason
=
"RAM usage"
;
...
...
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