Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear all open interval and resolve callback error #15

Merged
merged 1 commit into from Aug 22, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Clear all open interval and resolve callback error

  • Loading branch information
Shweta Jain
Shweta Jain committed Aug 16, 2017
commit e06901af87f759fa871471a3491497831aa47501
@@ -206,8 +206,11 @@ common.loggly = function () {
if (timerFunction === null) {
timerFunction = setInterval(function () {
sendBulkLogs();
},30000);
}
},5000);
} else if (timerFunction && !arrMsg.length) {
clearInterval(timerFunction);
timerFunction = null;
}
arrMsg.push(requestBody);
if (arrMsg.length === arrSize) {
sendBulkLogs();
@@ -224,7 +227,10 @@ common.loggly = function () {
timerFunctionForBufferedLogs = setInterval(function () {
if (arrBufferedMsg.length) sendBufferdLogstoLoggly();
}, bufferOptions.retriesInMilliSeconds);
}
} else if (timerFunctionForBufferedLogs && !arrBufferedMsg.length) {
clearInterval(timerFunctionForBufferedLogs);
timerFunctionForBufferedLogs = null;
}


function sendBufferdLogstoLoggly() {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.