在初始同步准备好之前调用 DataStore.stop() 会导致此方法永远无法解析
作者: nghiatranhnl创建于 2026年9月24日更新于 2026年9月28日
标签bugDataStorepending-maintainer-response
this.runningProcesses.add(async onTerminate => { // #region GraphQL Subscriptions await new Promise((_resolve, _reject) => { // #endregion }); // #region Sync Queries await new Promise((_resolve, _reject) => { // #endregion }); });
The `onTerminate` event is emitted when the process is terminated, which is not the case for the sync-queries job. This means that the `onTerminate` event is never emitted, and the job never completes. The `onTerminate` event is also used to stop the sync-queries job, which is why the job never completes.内容来源: aws-amplify/amplify-js