Issue still there. Can't create new thread in www.dotnetnuke.com forums.
Anyways, the issue that I've found on my end (for which i'm trying to open a thread of course) is that the AddEventLog Stored Procedure is buggy and messes the DotNetNuke.Services.Log.EventLog.SendLogNotifications schedule functionality. I tried posting the bugs in support.dotnetnuke.com but apparently i need permission to open issues which i don't have. So, in hope that someone will read this post and do something about it I'm going to post the updated stored procedure here (with my changes highlighted):
ALTER procedure [dbo].[AddEventLog]
@LogGUID varchar(36),
@LogTypeKey nvarchar(35),
@LogUserID int,
@LogUserName nvarchar(50),
@LogPortalID int,
@LogPortalName nvarchar(100),
@LogCreateDate datetime,
@LogServerName nvarchar(50),
@LogProperties ntext,
@LogConfigID int
AS
INSERT INTO dbo.EventLog
(LogGUID,
LogTypeKey,
LogUserID,
LogUserName,
LogPortalID,
LogPortalName,
LogCreateDate,
LogServerName,
LogProperties,
LogConfigID)
VALUES
(@LogGUID,
@LogTypeKey,
@LogUserID,
@LogUserName,
@LogPortalID,
@LogPortalName,
@LogCreateDate,
@LogServerName,
@LogProperties,
@LogConfigID)
DECLARE @NotificationActive bit
DECLARE @NotificationThreshold bit
DECLARE @ThresholdQueue int
DECLARE @NotificationThresholdTime int
DECLARE @NotificationThresholdTimeType int
DECLARE @MinDateTime datetime
DECLARE @CurrentDateTime datetime
SET @CurrentDateTime = getDate()
SELECT TOP 1 @NotificationActive = EmailNotificationIsActive,
@NotificationThreshold = NotificationThreshold,
@NotificationThresholdTime = NotificationThresholdTime,
@NotificationThresholdTimeType = NotificationThresholdTimeType,
@MinDateTime =
CASE
--seconds
WHEN NotificationThresholdTimeType=1 THEN DateAdd(second, NotificationThresholdTime * -1, @CurrentDateTime)
--minutes
WHEN NotificationThresholdTimeType=2 THEN DateAdd(minute, NotificationThresholdTime * -1, @CurrentDateTime)
--hours
WHEN NotificationThresholdTimeType=3 THEN DateAdd(Hour, NotificationThresholdTime * -1, @CurrentDateTime)
--days
WHEN NotificationThresholdTimeType=4 THEN DateAdd(Day, NotificationThresholdTime * -1, @CurrentDateTime)
END
FROM dbo.EventLogConfig
WHERE ID = @LogConfigID
IF @NotificationActive=1
BEGIN
SELECT @ThresholdQueue = COUNT(*)
FROM dbo.EventLog
INNER JOIN dbo.EventLogConfig
ON dbo.EventLog.LogConfigID = dbo.EventLogConfig.ID
WHERE LogCreateDate > @MinDateTime
AND dbo.EventLog.LogConfigID = @LogConfigID
PRINT 'MinDateTime=' + convert(varchar(20), @MinDateTime)
PRINT 'ThresholdQueue=' + convert(varchar(20), @ThresholdQueue)
PRINT 'NotificationThreshold=' + convert(varchar(20), @NotificationThreshold)
IF @ThresholdQueue > @NotificationThreshold
BEGIN
UPDATE dbo.EventLog
SET LogNotificationPending = 1
WHERE LogConfigID = @LogConfigID
AND LogNotificationPending IS NULL
AND LogCreateDate > @MinDateTime
END
END