-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove sendEmail method Use sentry to capture exception instead.
- Loading branch information
Showing
15 changed files
with
34 additions
and
672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,7 +114,6 @@ angular.module('oncokbApp') | |
}, function(reason) { | ||
// something goes wrong then the data in database should not be updated. | ||
}); | ||
mainUtils.sendEmailtoMultipulUsers(['[email protected]', '[email protected]', '[email protected]'], 'Reminder: A therapy preferred name changed.', content); | ||
} | ||
} | ||
}; | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3387,18 +3387,7 @@ angular.module('oncokbApp') | |
}, function (error) { | ||
// Something goes wrong, this needs to be stored into meta file for future update. | ||
console.log('Failed to update priority.'); | ||
DatabaseConnector.sendEmail({ | ||
sendTo: '[email protected]', | ||
subject: 'Error when updating treatments\' priority', | ||
content: JSON.stringify(postData) | ||
}, | ||
function (result) { | ||
deferred.rejected(error); | ||
}, | ||
function (error) { | ||
deferred.rejected(error); | ||
} | ||
); | ||
Sentry.captureException(new Exception('Error when updating treatments\' priority. Data: ' + JSON.stringify(postData))); | ||
}); | ||
} else { | ||
deferred.resolve(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,8 +62,7 @@ angular.module('oncokbApp') | |
$location.url('/genes'); | ||
} | ||
}, function(error) { | ||
mainUtils.sendEmail('[email protected]', 'Failed to set user role.', | ||
'Content: \n' + JSON.stringify(firebaseUser) + '\n\nError: \n' + JSON.stringify(error)); | ||
Sentry.captureException(new Exception('Failed to set user role. Content: \n' + JSON.stringify(firebaseUser) + '\n\nError: \n' + JSON.stringify(error))); | ||
}); | ||
} else { | ||
console.log('not logged in yet'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,6 @@ angular.module('oncokbApp') | |
$scope.addDrugErrorMessage = 'Failed to create the drug ' + drugName + '! Please contact developers.'; | ||
deferred.reject(error); | ||
}); | ||
mainUtils.sendEmailtoMultipulUsers(['[email protected]', '[email protected]', '[email protected]'], 'Reminder: A therapy has been added.', content); | ||
} | ||
else { | ||
$scope.addDrugErrorMessage = "Sorry, same drug exists."; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ angular.module('oncokbApp') | |
'Evidence', | ||
'SearchVariant', | ||
'DriveAnnotation', | ||
'SendEmail', | ||
'Sentry', | ||
'onLocalhost', | ||
'DataSummary', | ||
'Drugs', | ||
|
@@ -29,7 +29,7 @@ angular.module('oncokbApp') | |
Evidence, | ||
SearchVariant, | ||
DriveAnnotation, | ||
SendEmail, | ||
Sentry, | ||
onLocalhost, | ||
DataSummary, | ||
Drugs, | ||
|
@@ -51,16 +51,7 @@ angular.module('oncokbApp') | |
.then(function(data) { | ||
deferred.resolve(data.data); | ||
}, function(error) { | ||
var subject = 'searchDrugs Error'; | ||
var content = 'The system error returned is ' + JSON.stringify(error); | ||
sendEmail({sendTo: '[email protected]', subject: subject, content: content}, | ||
function(result) { | ||
console.log('sent searchDrugs Error to oncokb dev account'); | ||
}, | ||
function(error) { | ||
console.log('fail to send searchDrugs Error to oncokb dev account', error); | ||
} | ||
); | ||
Sentry.captureException(new Exception('Failed to add a new history record for ' + hugoSymbol + '. \n\n Content: ' + JSON.stringify(historyData) + '\n\nError: \n' + JSON.stringify(error))); | ||
deferred.reject(error); | ||
}); | ||
return deferred.promise; | ||
|
@@ -246,16 +237,9 @@ angular.module('oncokbApp') | |
.then(function(data) { | ||
success(data); | ||
}, function(error) { | ||
var subject = 'VUS update Error for ' + hugoSymbol; | ||
var content = 'The system error returned is ' + JSON.stringify(error); | ||
sendEmail({sendTo: '[email protected]', subject: subject, content: content}, | ||
function(result) { | ||
console.log('sent old history to oncokb dev account'); | ||
}, | ||
function(error) { | ||
console.log('fail to send old history to oncokb dev account', error); | ||
} | ||
); | ||
var content = 'VUS update Error for ' + hugoSymbol; | ||
content = content + '\nThe system error returned is ' + JSON.stringify(error); | ||
Sentry.captureException(new Exception(content)); | ||
fail(error); | ||
setAPIData('vus', hugoSymbol, data); | ||
}); | ||
|
@@ -312,20 +296,6 @@ angular.module('oncokbApp') | |
return DriveAnnotation.updateEvidenceRelevantCancerTypesBatch(data); | ||
} | ||
|
||
function sendEmail(params, success, fail) { | ||
if (testing || !inProduction) { | ||
success(true); | ||
} else { | ||
SendEmail | ||
.init(params) | ||
.then(function(data) { | ||
success(data); | ||
}, function() { | ||
fail(); | ||
}); | ||
} | ||
} | ||
|
||
function timeout(callback, timestamp) { | ||
$timeout(function() { | ||
if (numOfLocks[timestamp] === 0) { | ||
|
@@ -490,15 +460,7 @@ angular.module('oncokbApp') | |
}).then(function(ref) { | ||
console.log('Added a new history record.'); | ||
}, function (error) { | ||
sendEmail({sendTo: '[email protected]', subject: 'Failed to add a new history record for ' + hugoSymbol | ||
+ '.', content: JSON.stringify(historyData) + '\n\nError: \n' + JSON.stringify(error)}, | ||
function(result) { | ||
console.log('sent history error to oncokb dev account'); | ||
}, | ||
function(error) { | ||
console.log('fail to send history error to oncokb dev account', error); | ||
} | ||
); | ||
Sentry.captureException(new Exception('Failed to add a new history record for ' + hugoSymbol + '. \n\n Content: ' + JSON.stringify(historyData) + '\n\nError: \n' + JSON.stringify(error))); | ||
}); | ||
} | ||
|
||
|
@@ -585,7 +547,6 @@ angular.module('oncokbApp') | |
updateEvidenceTreatmentPriorityBatch: updateEvidenceTreatmentPriorityBatch, | ||
updateEvidenceRelevantCancerTypesBatch: updateEvidenceRelevantCancerTypesBatch, | ||
addHistoryRecord: addHistoryRecord, | ||
sendEmail: sendEmail, | ||
getCacheStatus: getCacheStatus, | ||
updateGeneCache: function(hugoSymbol) { | ||
return updateGeneCache(hugoSymbol); | ||
|
Oops, something went wrong.