Skip to content

Push database index commit event #8814

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

Closed
3 tasks done
WingDr opened this issue Jul 24, 2023 · 3 comments
Closed
3 tasks done

Push database index commit event #8814

WingDr opened this issue Jul 24, 2023 · 3 comments
Assignees
Milestone

Comments

@WingDr
Copy link

WingDr commented Jul 24, 2023

插入/更新块的Promise完成时,其内容没更新到sql中

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

await运行prependBlock之后,当我尝试通过SQL查找插入的部分内容时,会出现找不到的情况,后来尝试在我的电脑上等待2秒后才能查到。但是问题在于我不知道用户的电脑需要多久才能更新出来。

image

但是由于HTML块不能和markdown一起更新,我只能这么做

Expected result

不管await多久,理论上Promise结束的时候这个块应该在SQL里是准备好的,或者说有个指示标明更新完毕我可以开始下一个操作了

Screenshot or screen recording presentation

No response

Version environment

- Version: 2.9.6
- Operating System: windows
- Browser (if used):

Log file

none

More information

No response

@88250
Copy link
Member

88250 commented Jul 25, 2023

数据库索引是个异步任务,无法确定具体执行完成时间。

要不我们加个 SQL 索引结束的事件推送?

@WingDr
Copy link
Author

WingDr commented Jul 25, 2023

数据库索引是个异步任务,无法确定具体执行完成时间。

要不我们加个 SQL 索引结束的事件推送?

我觉得ok,只要是能知道啥时候能再查就行

@88250 88250 changed the title 插入/更新块的Promise完成时,其内容没更新到sql中 Push database index complete event Jul 26, 2023
@88250 88250 added this to the 2.9.8 milestone Jul 26, 2023
@88250 88250 changed the title Push database index complete event Push database index commit event Jul 27, 2023
88250 added a commit that referenced this issue Jul 27, 2023

Verified

This commit was signed with the committer’s verified signature.
@Vanessa219
Copy link
Member

使用 EventBus 监听 ws-main ,检测 cmd 为 databaseIndexCommit 即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants