Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#14985 closed (invalid)

post_save signal should trigger after data persistence to database.

Reported by: xuqingkuang Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I just deployed xapian search engine in my web site, with djapian, because of it doesn't support real time index so far, so I do it with signals. Every post_save and post_delete signal will trigger the update index action.

But it seems post_save is triggered before the data saved to database, it's meaning when the signal try to update the index, but the data didn't updated real.

It can't understandable, post_save should trigger after the data saved to database, not in the before save() action completed.

Hope it fix soon.

Change History (2)

comment:1 Changed 7 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

post_save is most definitely triggered after the save, which is after the INSERT/UPDATE statement has been issued.

However, depending on the transactional behavior you are using, that doesn't guarantee that the object has been persisted to the database. I'm guessing this is the problem you are seeing.

comment:2 Changed 7 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top