Commit Graph

13 Commits

Author SHA1 Message Date
Klaas van Schelven 7616b0ea77 Document timing of task.create/delete in code 2025-04-17 10:16:43 +02:00
Klaas van Schelven 59372aba33 First version of multi-tenant setup (EE) 2025-01-29 09:04:19 +01:00
Klaas van Schelven c453ca00e5 Snappea connection_close 2024-07-05 16:28:23 +02:00
Klaas van Schelven 5af1d2384e Performance logging of Snappea task create/delete 2024-05-22 17:45:28 +02:00
Klaas van Schelven 8ca2388c45 Factor out wakeup_server 2024-04-23 15:27:57 +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 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 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 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 3c106521bc snappea WIP commit 2024-04-19 16:21:42 +02:00