Ghost/core/server/models
Nazar Gargol 95044e3ba0 Added error handling for failed member imports
no issue

- When bulk insert fails there is no transactional logic to revert
related records form being inserted. Also, previously there were no
attempts to "retry" the insert.
- To avoid complex retry logic, an iterative one-by-one insert retry
approach was taken. If this becomes a bottleneck in the future, the
retry algorithm could be improved.
- To avoid a lot of code duplication refactored model's `bulkAdd` & `bulkDestroy`
methods to use 'bulk-operations' module.
- Updated error handling and logging for bulk delete operations. It's very
unlikely for error to happen here,  but still need to make sure there is
a proper logging in place to trace back the failure.
- Added debug logs. This should improve debugging experience and
performance measurements.
- Added handling for unrecognized errors. Handling inspired by current unrecognized
error handling by ghost importer -10e5d5f3d4/core/server/data/importer/importers/data/base.js (L148-L154)
2020-08-26 17:11:35 +12:00
..
base Added error handling for failed member imports 2020-08-26 17:11:35 +12:00
plugins Added ?paid query parameter to Admin API members browse endpoint (#11892) 2020-06-12 12:12:10 +01:00
relations Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
action.js Added model implementation for actions 2019-02-06 21:36:09 +01:00
api-key.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
author.js Added plugin based author and public tag models in API v2 (#10284) 2019-01-03 20:30:35 +01:00
email.js Added default stats object to email model 2019-11-08 17:11:54 +07:00
index.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
integration.js Ensured Admin API cannot fetch internal integrations (#10501) 2019-07-24 11:52:55 +02:00
invite.js Extracted core/server/lib/security to @tryghost/security package 2020-08-11 14:06:50 +01:00
label.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
member-stripe-customer.js Added error handling for failed member imports 2020-08-26 17:11:35 +12:00
member.js Added error handling for failed member imports 2020-08-26 17:11:35 +12:00
mobiledoc-revision.js Added mobiledoc revisions functionality 2018-10-09 15:31:09 +02:00
permission.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
post.js Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
posts-meta.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
role.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
session.js Removed user_id constraint when upserting session (#10085) 2018-10-30 16:15:48 +07:00
settings.js 🐛 Fixed importing Stripe Plans with amount 0 (#12062) 2020-07-20 14:59:23 +02:00
stripe-customer-subscription.js Added error handling for failed member imports 2020-08-26 17:11:35 +12:00
tag-public.js Added plugin based author and public tag models in API v2 (#10284) 2019-01-03 20:30:35 +01:00
tag.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
user.js Extracted promise libs and history into @tryghost/promise 2020-08-11 18:44:21 +01:00
webhook.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00