Skip to content

Commit 7d7c11c

Browse files
committed
Updated min heartbeat and idle settings intervals
1 parent 585057e commit 7d7c11c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

samples/Exceptionless.SampleConsole/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
using log4net.Config;
1818
#endif
1919
using NLog;
20+
using NLog.Config;
2021
using NLog.Fluent;
2122
using LogLevel = Exceptionless.Logging.LogLevel;
2223

2324
// example of setting an attribute value in config.
24-
[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:50000")]
25+
[assembly: Exceptionless("LhhP1C9gijpSKCslHHCvwdSIz298twx271n1l6xw", ServerUrl = "http://localhost:50000")]
2526
[assembly: ExceptionlessSetting("EnableWelcomeMessage", "True")]
2627

2728
namespace Exceptionless.SampleConsole {
@@ -47,7 +48,6 @@ public static void Main(string[] args) {
4748
if (!Console.IsInputRedirected)
4849
StartDisplayingLogMessages();
4950

50-
ExceptionlessClient.Default.Configuration.UpdateSettingsWhenIdleInterval = TimeSpan.FromSeconds(15);
5151
ExceptionlessClient.Default.Configuration.AddPlugin<SystemUptimePlugin>();
5252
ExceptionlessClient.Default.Configuration.UseFolderStorage("store");
5353
ExceptionlessClient.Default.Configuration.UseLogger(_log);

src/Exceptionless/Configuration/ExceptionlessConfiguration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,13 @@ public TimeSpan? UpdateSettingsWhenIdleInterval {
167167
if (_updateSettingsWhenIdleInterval == value)
168168
return;
169169

170-
if (value.HasValue && value > TimeSpan.Zero && value < TimeSpan.FromSeconds(15))
171-
_updateSettingsWhenIdleInterval = TimeSpan.FromSeconds(15);
170+
if (value.HasValue && value > TimeSpan.Zero && value < TimeSpan.FromMinutes(2))
171+
_updateSettingsWhenIdleInterval = TimeSpan.FromMinutes(2);
172172
else if (value.HasValue && value <= TimeSpan.Zero)
173173
_updateSettingsWhenIdleInterval = TimeSpan.FromMilliseconds(-1);
174174
else
175175
_updateSettingsWhenIdleInterval = value;
176-
176+
177177
OnChanged();
178178
}
179179
}

src/Exceptionless/Plugins/Default/100_HeartbeatPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class HeartbeatPlugin : IEventPlugin, IDisposable {
1313
/// </summary>
1414
/// <param name="interval">The interval at which heartbeats are sent after the last sent event. The default is 1 minutes.</param>
1515
public HeartbeatPlugin(TimeSpan? interval = null) {
16-
_interval = interval.HasValue && interval.Value.Ticks > 0 ? interval.Value : TimeSpan.FromMinutes(1);
16+
_interval = interval.HasValue && interval.Value.Seconds >= 30 ? interval.Value : TimeSpan.FromMinutes(1);
1717
}
1818

1919
public void Run(EventPluginContext context) {

0 commit comments

Comments
 (0)