Merge lp:~seif/zeitgeist/fix-738555 into lp:zeitgeist/0.1
Status: | Merged |
---|---|
Merged at revision: | 1722 |
Proposed branch: | lp:~seif/zeitgeist/fix-738555 |
Merge into: | lp:zeitgeist/0.1 |
Diff against target: |
60 lines (+19/-7) 1 file modified
_zeitgeist/engine/extensions/datasource_registry.py (+19/-7) |
To merge this branch: | bzr merge lp:~seif/zeitgeist/fix-738555 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Siegfried Gevatter | Approve | ||
Review via email: mp+58818@code.launchpad.net |
Description of the change
Add a try except block in the _write_to_disk method
Add a counter to write to disk upon every 20 events
Fixed some indents
----
OK so a primary solution for this was putting the content of _write_to_disk
in datasource_
My primary fear was that the next extension or zeitgeist would crash trying
to write to the disk. This was not the case and the error was caught.
To explain why the other stuff did not crash is:
1) This was the only extension writing to disk upon unloading
2) The engine does not write to disk upon exit since all events are written
to disk upon entrance.
My primary solution would be to put the _write_to_disk in a normal "try -
catch" block for now...
Add a try except block in the _write_to_disk method
Add a counter to write to disk upon every 20 events
Fixed some indents