Commit Graph

475 Commits

Author SHA1 Message Date
Klaas van Schelven
52f720bf4f Add missing file 2024-04-24 12:30:25 +02:00
Klaas van Schelven
66a24a60b6 Remove unused vendored middlewares 2024-04-24 08:25:47 +02:00
Klaas van Schelven
0855299c97 Robustness of Task -> actual running thread mechanism 2024-04-23 15:28:21 +02:00
Klaas van Schelven
8ca2388c45 Factor out wakeup_server 2024-04-23 15:27:57 +02:00
Klaas van Schelven
1e16f80236 Snappea: minor textual in logging 2024-04-23 13:45:09 +02:00
Klaas van Schelven
ab7b7c467b Snappea: file locations configurable 2024-04-23 13:42:36 +02:00
Klaas van Schelven
9adf971a14 Snappea: settings configurable 2024-04-23 13:32:33 +02:00
Klaas van Schelven
1ef7458619 Snappea: Only do another Task query when the previous result was perhaps limited by the TASK_QS_SIZE 2024-04-23 12:07:03 +02:00
Klaas van Schelven
a7d484f070 Snappea: logging 2024-04-23 11:28:07 +02:00
Klaas van Schelven
08330dd274 Use proper thread-local for wakeup_file uuid part
Stackoverflow said "In Python, everything is shared, except for function-local
variables (because each function call gets its own set of locals, and threads
are always separate function calls.) "

whatever was meant exactly by that, it's not true for us, because our functions
are called on-import, and the vars-in-closure are shared between threads. i.e.:

>>> from threading import Thread
>>> def closure():
...   l = []
...   def inner():
...     l.append("x")
...     print(len(l))
...   return inner
...
>>> inner = closure()
>>> thread = Thread(target=inner)
>>> thread.start()
1
>>> thread = Thread(target=inner)
>>> thread.start()
2
2024-04-23 09:42:24 +02:00
Klaas van Schelven
c7d96c362e Bind wakeup_filename to the decorator to avoid flooding the associated dir with wakeup signals 2024-04-22 22:56:39 +02:00
Klaas van Schelven
1fc1da1ceb Implement the registry's 'autodiscover'
actually: not autodiscover on-bootup, but just try to import the tasks
when you actually need them. This makes it so that we can avoid the whole
of the Django app-loading magical machinery
2024-04-22 22:37:47 +02:00
Klaas van Schelven
5597e423ea Document roads-not-taken with the wake-up calls 2024-04-22 15:52:34 +02:00
Klaas van Schelven
4fbc283f3e Convert snappea 'wakeup' signal to inotify-based
see https://github.com/python/cpython/issues/118143
2024-04-22 15:34:33 +02:00
Klaas van Schelven
46f34370f4 Snappea: Document stuff (and factor a few bits out) 2024-04-19 23:14:19 +02:00
Klaas van Schelven
b03c2ec088 Remove celery 2024-04-19 21:58:32 +02:00
Klaas van Schelven
41a4913299 Implement SNAPPEA_TASK_ALWAYS_EAGER 2024-04-19 21:41:42 +02:00
Klaas van Schelven
cb3b236106 Pea -> Task 2024-04-19 21:29:04 +02:00
Klaas van Schelven
8d2713e09d Logs (slightly) less noisy 2024-04-19 21:24:15 +02:00
Klaas van Schelven
0467e1d316 Snappea: implement graceful shutdown 2024-04-19 21:16:41 +02:00
Klaas van Schelven
3c106521bc snappea WIP commit 2024-04-19 16:21:42 +02:00
Klaas van Schelven
318a26526d Yet another WIP 2024-04-19 14:01:06 +02:00
Klaas van Schelven
14fd545f79 WIP: Example with actual workers and waiting for those 2024-04-19 13:12:01 +02:00
Klaas van Schelven
4e484ff3d7 Another midway checkin; demonstrating semaphore usage and how it is robust for multiple signals 2024-04-19 12:11:25 +02:00
Klaas van Schelven
94d0fda6ab Midway checking to preserve state 2024-04-19 11:58:20 +02:00
Klaas van Schelven
059f831816 Document thoughts on the model for write-transactions 2024-04-19 09:23:13 +02:00
Klaas van Schelven
8e70d04c2c Split issue_list into 2 parts for a shorter write-lock 2024-04-19 09:16:18 +02:00
Klaas van Schelven
73388e5989 Performance: get some view into DB (IMMEDIATE) transactions 2024-04-19 09:02:08 +02:00
Klaas van Schelven
6bb7ce89a1 Factor out delay_on_commit 2024-04-19 08:18:19 +02:00
Klaas van Schelven
c50780ab4e Use atomic transactions in views 2024-04-18 13:15:46 +02:00
Klaas van Schelven
1e1f7c4a6d Fix tests (for recent timezone change) 2024-04-18 08:39:29 +02:00
Klaas van Schelven
912e212b23 Use a more canonical way of configuring the timeout 2024-04-17 23:52:01 +02:00
Klaas van Schelven
d1b8bbf529 Add immediate_atomic 2024-04-17 23:42:57 +02:00
Klaas van Schelven
8c7e1f1cf2 Configure sqlite WAL and related PRAGMAs 2024-04-17 21:50:39 +02:00
Klaas van Schelven
d75bede5dd Show current status for issues 2024-04-16 21:54:36 +02:00
Klaas van Schelven
3a571afce7 Show timezones in templates
and: put it on Europe/Amsterdam 'for now'. Better local development experience
2024-04-16 13:59:15 +02:00
Klaas van Schelven
a7c02a24e2 Show 'seen in releases' in the UI 2024-04-16 13:31:08 +02:00
Klaas van Schelven
5ae0a8227f Implement bookkeeping of events_at
(I didn't think the effects on regressions through, but this will at least
manifest itself because you cannot mark an issue as "fixed in" a release
in which it occurs. It will also show up once we start displaying "events_at"
in the UI, which should be "soon")
2024-04-16 13:25:18 +02:00
Klaas van Schelven
d89e3d4dd5 Add 'next-materialized historic annotation 2024-04-16 09:31:12 +02:00
Klaas van Schelven
9c6a73e3cc Performance of update-fixed-at-on-new-release 2024-04-16 08:56:56 +02:00
Klaas van Schelven
d17292b2b7 Fix typo (textual) 2024-04-15 20:28:42 +02:00
Klaas van Schelven
f52bac2745 Add __repr__ to VBC
this is the thing the Sentry SDK uses; having it available may come in handy
when debugging
2024-04-15 20:01:47 +02:00
Klaas van Schelven
f236dea0bf Don't allow newly created empty comments 2024-04-15 19:47:30 +02:00
Klaas van Schelven
a5f6326d26 Implement ctrl-enter form-submitting for the history comments 2024-04-15 19:43:18 +02:00
Klaas van Schelven
c3f8996e6b History view: Make button stand out less 2024-04-15 19:33:08 +02:00
Klaas van Schelven
308a257d3f Implement comment-deleting 2024-04-15 16:02:03 +02:00
Klaas van Schelven
d3e73a5c87 Permission-check on comment-editing 2024-04-15 15:12:43 +02:00
Klaas van Schelven
8db44bbb6d Fix ResponseNotAllowed usage
not sure if this is 'a keeper' but let's at least use the right syntax
2024-04-15 15:10:21 +02:00
Klaas van Schelven
875f306079 Reduce queries of 'history' view
* select_related for users (which are displayed in many locations)
* use 'xxx_id' if that's all you need
2024-04-15 15:06:27 +02:00
Klaas van Schelven
132d06bf49 Fix csrf_token (it was outside form) 2024-04-15 14:56:34 +02:00