Skip to content

model 的事件处理貌似有问题。 #10

@tea-sun

Description

@tea-sun

如果在db事务中$model->save()或$mode->delete(); 会触发model事件并同步到elasticsearch, 那么如果后续由于其他原因导致db事务回滚。 那同步到elasticsearch的操作还是会继续进行的。 那么就会导致结果不同步.laravel的scout上有after commit选项。可以在定义在事务提交成功后再进行。hyperf/scout并没有这个机制.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions