Store the messages and return any unstored messages after trying all backends. For each storage backend, any messages not stored are passed on to the next backend.
(self, messages, response, *args, **kwargs)
| 38 | return all_messages, all_retrieved |
| 39 | |
| 40 | def _store(self, messages, response, *args, **kwargs): |
| 41 | """ |
| 42 | Store the messages and return any unstored messages after trying all |
| 43 | backends. |
| 44 | |
| 45 | For each storage backend, any messages not stored are passed on to the |
| 46 | next backend. |
| 47 | """ |
| 48 | for storage in self.storages: |
| 49 | if messages: |
| 50 | messages = storage._store(messages, response, remove_oldest=False) |
| 51 | # Even if there are no more messages, continue iterating to ensure |
| 52 | # storages which contained messages are flushed. |
| 53 | elif storage in self._used_storages: |
| 54 | storage._store([], response) |
| 55 | self._used_storages.remove(storage) |
| 56 | return messages |