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
4ea2d8bd
Commit
4ea2d8bd
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Fix public / private inconsistencies.
parent
f632c0e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AutoTx/AutoTx.cs
+4
-4
4 additions, 4 deletions
AutoTx/AutoTx.cs
AutoTx/Email.cs
+6
-6
6 additions, 6 deletions
AutoTx/Email.cs
with
10 additions
and
10 deletions
AutoTx/AutoTx.cs
+
4
−
4
View file @
4ea2d8bd
...
...
@@ -242,7 +242,7 @@ namespace AutoTx
/// <summary>
/// Check if loaded configuration is valid, print a summary to the log.
/// </summary>
p
ublic
void
CheckConfiguration
()
{
p
rivate
void
CheckConfiguration
()
{
// non-critical / optional configuration parameters:
if
(!
string
.
IsNullOrWhiteSpace
(
_config
.
SmtpHost
))
SetupMailLogging
();
...
...
@@ -481,7 +481,7 @@ namespace AutoTx
/// <summary>
/// Do the main tasks of the service, check system state, trigger transfers, ...
/// </summary>
p
ublic
void
RunMainTasks
()
{
p
rivate
void
RunMainTasks
()
{
// mandatory tasks, run on every call:
SendLowSpaceMail
(
SystemChecks
.
CheckFreeDiskSpace
(
_config
.
SpaceMonitoring
));
UpdateServiceState
();
...
...
@@ -522,7 +522,7 @@ namespace AutoTx
/// <summary>
/// Check for transfers to be finished, resumed or newly initiated.
/// </summary>
p
ublic
void
RunTransferTasks
()
{
p
rivate
void
RunTransferTasks
()
{
// only proceed when in a valid state:
if
(
_transferState
!=
TxState
.
Stopped
&&
_transferState
!=
TxState
.
Paused
)
...
...
@@ -693,7 +693,7 @@ namespace AutoTx
/// a subdirectory with the current date and time as its name to denote the timepoint
/// when the grace period for this data starts.
/// </summary>
p
ublic
void
MoveToGraceLocation
()
{
p
rivate
void
MoveToGraceLocation
()
{
string
errMsg
;
// CurrentTransferSrc is e.g. D:\ATX\PROCESSING\2017-04-02__12-34-56\user00
var
sourceDirectory
=
new
DirectoryInfo
(
_status
.
CurrentTransferSrc
);
...
...
This diff is collapsed.
Click to expand it.
AutoTx/Email.cs
+
6
−
6
View file @
4ea2d8bd
...
...
@@ -16,7 +16,7 @@ namespace AutoTx
/// <param name="recipient">A full email address OR a valid ActiveDirectory account.</param>
/// <param name="subject">The subject, might be prefixed with a configurable string.</param>
/// <param name="body">The email body.</param>
p
ublic
void
SendEmail
(
string
recipient
,
string
subject
,
string
body
)
{
p
rivate
void
SendEmail
(
string
recipient
,
string
subject
,
string
body
)
{
subject
=
_config
.
EmailPrefix
+
subject
;
if
(
string
.
IsNullOrEmpty
(
_config
.
SmtpHost
))
{
Log
.
Debug
(
"SendEmail: {0}\n{1}"
,
subject
,
body
);
...
...
@@ -76,7 +76,7 @@ namespace AutoTx
///
/// TODO: Once logging has stabilized we can probably safely remove this method again!
/// </summary>
p
ublic
void
AdminDebugLog
(
string
subject
,
string
format
,
params
object
[]
list
)
{
p
rivate
void
AdminDebugLog
(
string
subject
,
string
format
,
params
object
[]
list
)
{
var
msg
=
string
.
Format
(
format
,
list
);
SendAdminEmail
(
msg
,
subject
);
msg
=
subject
+
"\n"
+
msg
;
...
...
@@ -88,7 +88,7 @@ namespace AutoTx
/// </summary>
/// <param name="body">The email text.</param>
/// <param name="subject">Optional subject for the email.</param>
p
ublic
void
SendAdminEmail
(
string
body
,
string
subject
=
""
)
{
p
rivate
void
SendAdminEmail
(
string
body
,
string
subject
=
""
)
{
if
(
_config
.
SendAdminNotification
==
false
)
return
;
...
...
@@ -117,7 +117,7 @@ namespace AutoTx
/// Send a notification about low drive space to the admin.
/// </summary>
/// <param name="spaceDetails">String describing the drives being low on space.</param>
p
ublic
void
SendLowSpaceMail
(
string
spaceDetails
)
{
p
rivate
void
SendLowSpaceMail
(
string
spaceDetails
)
{
if
(
string
.
IsNullOrWhiteSpace
(
spaceDetails
))
return
;
...
...
@@ -153,7 +153,7 @@ namespace AutoTx
/// Send a notification email to the file owner upon successful transfer.
/// The recipient address is derived from the global variable CurrentTransferSrc.
/// </summary>
p
ublic
void
SendTransferCompletedMail
()
{
p
rivate
void
SendTransferCompletedMail
()
{
if
(
_config
.
SendTransferNotification
==
false
)
return
;
...
...
@@ -192,7 +192,7 @@ namespace AutoTx
/// Send a notification email when a transfer has been interrupted before completion.
/// Recipient address is derived from the global variable CurrentTransferSrc.
/// </summary>
p
ublic
void
SendTransferInterruptedMail
()
{
p
rivate
void
SendTransferInterruptedMail
()
{
if
(
_config
.
SendTransferNotification
==
false
)
return
;
...
...
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