The test creates a new post, containing a known image
which has been rotated 90 degrees.
It then checks:
- the size of the canvas
- the size of the thumbnail
- if the image is searchable using non-exif data
Raise an exception when exiftool provides a Warning or Error,
which usually indicates a corrupted file.
This exception is handled by the allow_broken_uploads setting.
This change resolves https://github.com/rr-/szurubooru/issues/470
As well as correcting a related issue with thumbnail rotation.
Based on the EXIF Orientation data,
we correctly size the scaled image in the post view,
and rotate the image before creating its thumbnail.
exiftool presents similar data to ffprobe, so it may be used as a replacement.
notably, this change will give us access to the "Orientation" tag,
which ffprobe does not provide.
[server] install exiftool on the docker image
[server] replace Image._reload_info's implementation with a call to exiftool
[server] remove unused Image.frames property; replace with Image.duration
This should fix most scaling problems without needing to start
more server instances. By default, waitress maintains at most
4 threads. This works fine if the database is small (sub 100k posts)
but causes a large Task queue depth to occur if the database is larger.
Letting users increase the amount of threads means that one server instance
is able to handle more requests without locking up the rest of the site.
This adds a new environment variable to .env, THREADS, which can be used to
configure the amount of threads to start and is by default set to 4
(the default amount used by waitress).
* `test_modify_saves_non_empty_diffs` needs non-transactional
db, so moved to seperate file
* Replaced incompatable usage of `db.session.rollback()`
with parametrerized function calls
* xfail conditionals for search removed, as we can no longer
get current driver with binds
* Also remove usage of deprecated `pytest.yield_fixture`