Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
10 Trả lời
3796 Lượt xem

I've noticed that some messages disappear from mail_message. The id is 90k higher than the count of all stored messages.

Is there any parameter that needs to be set that custom messages won't get deleted?

Ảnh đại diện
Huỷ bỏ

Any chance somebody tried to import a lot of messages into your system? If somebody tried to import a big amount of messages and the import failed the ID's will still be incremented.

Tác giả

No, mails started from scratch.

Tác giả Câu trả lời hay nhất

OK I've figured it out... this happens when you copy template code from tutorials without checking what every parameter does.  I had 

<field name="auto_delete" eval="True"/>
in my template.
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi Samo: 

Did you by any chance uninstall an app/module ? If you uninstall an app/module, the corresponding messages get deleted.

Ảnh đại diện
Huỷ bỏ
Tác giả

No I didn't uninstalled any modules. And that wouldn't be 1/8 off the records. ID at ~790k, number of messages ~700k.

Are the ids in the system sequential i.e. without gaps ?

Tác giả

nope there are small gaps between. Is it possible that the mail_thread widget doesn't show all messages?

You can check at the database level. If there are gaps, maybe that explains the difference.

Tác giả

I've looked in the DB. Does it delete the messages that failed to send?

As far as I know, I don't think it deletes messages. It may be using a pooling mechanism and caching a block of message ids. Unused message ids may be getting discarded at some time. This will need further digging into the code to ascertain the exact reason.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 1 19
3931
2
thg 7 25
4829
2
thg 12 24
7911
2
thg 11 24
28724
2
thg 5 24
7601