Ghost/ghost/custom-theme-settings-service
Daniel Lockyer 8859d6298c
Added guard for activateTheme being called in parallel causing sync bugs (#15053)
refs https://github.com/TryGhost/Team/issues/1666

- it seems like we may have a situation where `.activateTheme()` can be called simultaneously resulting in unexpected behaviour in the sync such as duplicate theme setting records
- adjusted behaviour to keep track of the currently running activation within the service and if `.activateTheme()` is called again whilst it's in progress it will wait for completion of the first sync before exiting early or continuing with a new activation

**Note:** There is a known edge-case if there are _more_ than 2 parallel `.activateTheme()` calls. We don't believe that will be an issue but calling it out in case we do still see duplicated custom setting records being created.

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-08-04 11:29:58 +01:00
..
lib Added guard for activateTheme being called in parallel causing sync bugs (#15053) 2022-08-04 11:29:58 +01:00
test Added guard for activateTheme being called in parallel causing sync bugs (#15053) 2022-08-04 11:29:58 +01:00
.eslintrc.js slimer new custom-theme-settings-service 2021-09-21 17:21:52 +01:00
index.js First pass at custom-theme-settings-service functionality 2021-09-22 21:56:45 +01:00
package.json Removed repository from component package.json files 2022-07-25 11:15:16 +02:00