Commit Graph

152 Commits (d43cf21e42801edf7c56f9a99f0971a5e17d38d1)

Author SHA1 Message Date
Mike Lang 2aadf79bfb thrimshim odo hack: assume unmatched time of day means dawn
until we can fix dawn detection.
7 months ago
Mike Lang 185e7fd4bf thrimshim: Read template attribution, not description 7 months ago
Christopher Usher b5d084305b Another fix 7 months ago
Christopher Usher 13f20ba882 More fixes 7 months ago
Christopher Usher 6cf475793b Fixes in response to PR comments 7 months ago
Christopher Usher 0d14d0b91b Added missing thumbnail attribution to video description 7 months ago
Mike Lang 1956063c67 upgrade to alpine 3.19
- gets us a slightly newer ffmpeg with more transitions
- requires deleting the EXTERNALLY_MANAGED flag file that makes pip not work
7 months ago
Mike Lang bad4f55cab upgrade to alpine:3.18 7 months ago
Mike Lang 6b1989ec4c Revert "Instead of backport libraries, just upgrade to alpine 3.20 (python 1.12)"
and the later attempts to make it work
7 months ago
Mike Lang ca6f589e30 but only AFTER installing pip 7 months ago
Mike Lang cf9cd114ed Stop pip from refusing to work inside our containers 7 months ago
Mike Lang 9960accc0f Instead of backport libraries, just upgrade to alpine 3.20 (python 1.12) 7 months ago
Christopher Usher add8d021a8 also apply fix to get_thumbnail 7 months ago
Mike Lang 861a426395 thrimshim: Fix performance issue with getting template png
Bytes returned from the database are a "memoryview" and not a bytes object.
These mostly behave the same, but one difference is that Flask recognizes
a bytes object as something it can send as-is, whereas a memoryview ends up using
its generic "iterable" processing. This results in sending every individual byte of the result
as a single part of a HTTP chunked encoding response, adding 5 bytes and a syscall to every byte returned.

The solution is to explicitly convert it to bytes before returning.
7 months ago
ElementalAlchemist 501549350b Fix name duplicate check to only run when the template name is changed
Without checking first, a rename is required for all thumbnail template modifications.
7 months ago
ElementalAlchemist ea6d256b6d Fix database access 7 months ago
Christopher Usher 4f5805fd8d I thought we had fixed this 7 months ago
ElementalAlchemist 8ac23f2927 When checking whether a template exists, check the right table 7 months ago
Christopher Usher b4882a9fc4 More bug fixes 7 months ago
Christopher Usher 7ed0bbedc4 Fixed typo 7 months ago
Christopher Usher d6f976ac0f Bug fixes and improvements in response to comments on the PR 7 months ago
Christopher Usher ecd638356d thrimshim now uses tags to set default thumbnail 7 months ago
Christopher Usher b1f6d8d0de Fixed bug in authenticate_artist 7 months ago
Christopher Usher 1ba8597957 Made including a new image optional when updating a template 7 months ago
Christopher Usher 2c5e1058e8 Added missing authentication decorators on calls that modify the
templates database table
7 months ago
Christopher Usher 8020df8e60 Logging for thumbnail template management 7 months ago
Mike Lang d4d2bbcad4 thrimshim: Fix accepting thumbnail crop/location on submit 7 months ago
Mike Lang f4dc0ea7f1 thrimshim: Fix auth query again, hopefully properly this time 7 months ago
Mike Lang 696d1c8baa Fix typo in thrimshim auth SQL 7 months ago
Christopher Usher e0fc1eaf08 Refactor get_thumbnail and other fixes and improvments 8 months ago
Christopher Usher 70c8afe779 Switching thrimshim over to store thumbnail templates in the database 8 months ago
Christopher Usher 33f75efc19 Updatea thrimshim authentication to use roles table 8 months ago
ZeldaZach c378a1e4ab Add Audit Logging for several endpoints
- Use transactions for DB commits to avoid audit-less logs

Endpoints Supported:
- Manual Link
- Reset Row
- Update Row
9 months ago
Mike Lang 23ad78d592 Record in database when end time is "--"
We need this so that reverse sync reproduces these values correctly.

To handle this in the database, we have a composite type (dashed: boolean, value: timestamp).
Value is always valid and is equivalent to the old timestamp column,
but must be equal to start_time if dashed is true.

The only place we directly reference this column outside sheetsync is thrimshim, where we
always consider the value only.
9 months ago
Mike Lang 12150a4005 thrimshim: Return list of available transitions
For use in thrimbletrimmer for a drop-down.
10 months ago
Mike Lang a3aaa37bb0 Restructure playlists table
to have all tags, not just playlists.
Notably, this means playlist ids may be null.
10 months ago
Mike Lang 8dd6741ee9 schema: Playlist tags may be null, indicating "match nothing"
This is intended for partially-entered playlist data where tags have not been specified yet.
10 months ago
Mike Lang be111ccb2a Change database primary key from UUID to TEXT
We still store uuids, but in text form.
This allows us to store non-UUID ids for systems that have other ids.
10 months ago
Mike Lang 3606fadaa8 Pin gevent version to work around build issues
Seeing the following error on latest versions of gevent:

 Traceback (most recent call last):
   File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
     return _run_code(code, main_globals, None,
   File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
     exec(code, run_globals)
   File "/usr/lib/python3.9/site-packages/zulip_bots/schedulebot.py", line 2, in <module>
     import gevent.monkey
   File "/usr/lib/python3.9/site-packages/gevent/__init__.py", line 72, in <module>
     from gevent._hub_local import get_hub
   File "/usr/lib/python3.9/site-packages/gevent/_hub_local.py", line 150, in <module>
     import_c_accel(globals(), 'gevent.__hub_local')
   File "/usr/lib/python3.9/site-packages/gevent/_util.py", line 148, in import_c_accel
     mod = importlib.import_module(cname)
   File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
     return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named 'gevent._gevent_c_hub_local'
2 years ago
Mike Lang 86951d5916 thrimshim: Fix bug in extrapolate code when time is a float 2 years ago
Mike Lang 7a27938244 thrimshim: Expose time of day and 24h time 2 years ago
Mike Lang 78c053000e Upgrade pip in order to make wheels work 2 years ago
Mike Lang c436871ba6 Fix bug in thrimshim for archive cuts 2 years ago
Mike Lang 3b1af8c5e5 thrimshim: Expose clock readings 2 years ago
Mike Lang 720f1c4b41 thrimshim: Sanity checks for odometer 2 years ago
Mike Lang 06cd5d48ee More extrapolation fixes 2 years ago
Mike Lang 834dc55b41 thrimshim: Fix typo in odo extrapolation 2 years ago
Mike Lang f0e2aae519 thrimshim: Fix odometer endpoint 2 years ago
Mike Lang a83dbb58f7 thrimshim: Fix default templates 2 years ago
Mike Lang 734a7371f3 Add bus_data DB table and have thrimshim able to query it for latest odo reading 2 years ago