public void ResetHeartbeatLock(Guid rootContentID, Guid siteID, Guid currentUserID)
{
carrot_RootContent rc = CompiledQueries.cqGetRootContentTbl(db, siteID, rootContentID);
if (rc != null) {
if (rc.Heartbeat_UserId.HasValue && rc.Heartbeat_UserId.Value == currentUserID) {
rc.EditHeartbeat = DateTime.UtcNow.AddHours(-2);
rc.Heartbeat_UserId = null;
db.SubmitChanges();
} else {
if (!rc.Heartbeat_UserId.HasValue) {
rc.EditHeartbeat = DateTime.UtcNow.AddHours(-4);
rc.Heartbeat_UserId = null;
db.SubmitChanges();
}
}
}
}