This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| lacre:notes [2023/06/29 19:49] – created pfm | lacre:notes [2023/10/12 22:35] (current) – sqlalchemy/aiosmtpd conflict pfm | ||
|---|---|---|---|
| Line 56: | Line 56: | ||
| On our test environment, | On our test environment, | ||
| + | |||
| + | ====== Implementing an Advanced Content Filter ====== | ||
| + | |||
| + | Of course I've started by making sure I can even test the advanced filter, so I've set up end-to-end tests similar to those already used by the simple content filter. Eventually I've rewritten tests for both content filters to use [[https:// | ||
| + | |||
| + | Benefits: | ||
| + | * The same test code can be executed many repeatedly (instead of being interrupted by the first fail). | ||
| + | * Passing keyword arguments to identify a sub-test makes failure messages more useful. | ||
| + | |||
| + | Downsides: | ||
| + | |||
| + | * These tests don't produce any output, so it might look like they were frozen. | ||
| + | |||
| + | While implementing advanced filter, I've also learned about [[https:// | ||
| + | |||
| + | * One should make sure that event-loops are used consistently. | ||
| + | * Starting a task is very easy. | ||
| + | * There are semaphores and other [[https:// | ||
| ====== Next steps ====== | ====== Next steps ====== | ||
| Line 61: | Line 79: | ||
| In the near future I’d like to: | In the near future I’d like to: | ||
| - | * improve the logging code (it’s already in progress); | ||
| * polish the code handling configuration; | * polish the code handling configuration; | ||
| - | * consider using [[https://www.postfix.org/FILTER_README.html# | + | * update documentation. |
| + | |||
| + | ====== Asynchronous I/O ====== | ||
| + | |||
| + | I'm having issues with integrating SQLAlchemy and aiosmtpd. | ||
| + | |||
| + | Stack Overflow entries: | ||
| + | |||
| + | * [[https://stackoverflow.com/q/46827007|RuntimeError: | ||
| + | * [[https:// | ||