datasette-events-forward 0.1a1__py3-none-any.whl → 0.1a2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of datasette-events-forward might be problematic. Click here for more details.

@@ -24,6 +24,9 @@ create table if not exists datasette_events_to_forward (
24
24
  # Default is to allow 1 every 10s
25
25
  rate_limit = AsyncLimiter(max_rate=1, time_period=10)
26
26
 
27
+ # Lock to prevent concurrent send_events() calls
28
+ send_events_lock = asyncio.Lock()
29
+
27
30
  DEFAULT_BATCH_LIMIT = 10
28
31
 
29
32
 
@@ -128,7 +131,8 @@ async def rate_limited_send_events(datasette):
128
131
  # had been inserted before the send_events() function was called
129
132
  await asyncio.sleep(0.05)
130
133
  async with rate_limit:
131
- await send_events(datasette)
134
+ async with send_events_lock:
135
+ await send_events(datasette)
132
136
 
133
137
 
134
138
  @hookimpl
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: datasette-events-forward
3
- Version: 0.1a1
3
+ Version: 0.1a2
4
4
  Summary: Forward Datasette events to another instance
5
5
  Author: Simon Willison
6
6
  License: Apache-2.0
@@ -13,14 +13,16 @@ Classifier: License :: OSI Approved :: Apache Software License
13
13
  Requires-Python: >=3.8
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: datasette >=1.0a10
16
+ Requires-Dist: datasette==1.0a19
17
17
  Requires-Dist: python-ulid
18
18
  Requires-Dist: aiolimiter
19
+ Requires-Dist: typing_extensions
19
20
  Provides-Extra: test
20
- Requires-Dist: pytest ; extra == 'test'
21
- Requires-Dist: pytest-asyncio ; extra == 'test'
22
- Requires-Dist: pytest-httpx ; extra == 'test'
23
- Requires-Dist: datasette-test ; extra == 'test'
21
+ Requires-Dist: pytest; extra == "test"
22
+ Requires-Dist: pytest-asyncio; extra == "test"
23
+ Requires-Dist: pytest-httpx; extra == "test"
24
+ Requires-Dist: datasette-test; extra == "test"
25
+ Dynamic: license-file
24
26
 
25
27
  # datasette-events-forward
26
28
 
@@ -0,0 +1,7 @@
1
+ datasette_events_forward/__init__.py,sha256=abRlM75YQwG8cjOMdR0TaR3GTtt_hZTfobVeKRp2T58,6233
2
+ datasette_events_forward-0.1a2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
3
+ datasette_events_forward-0.1a2.dist-info/METADATA,sha256=J0acEBm0ZeKmfBPBXkmYg-3aGKRR7Vmprtq4-gI4wRM,4215
4
+ datasette_events_forward-0.1a2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
5
+ datasette_events_forward-0.1a2.dist-info/entry_points.txt,sha256=gA9e336VTQukKzZ31P5fcujufJVRjNCqbOrQco5xQ-Q,54
6
+ datasette_events_forward-0.1a2.dist-info/top_level.txt,sha256=hcEFDCsbPWOqo39qf1PpGpWEqFsGk6wrZOTbR24TYqM,25
7
+ datasette_events_forward-0.1a2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,7 +0,0 @@
1
- datasette_events_forward/__init__.py,sha256=hSTfTqcKJ8Z_ujMgorR48nzd2Ubsjew2DEsrjeU9Xp8,6108
2
- datasette_events_forward-0.1a1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
3
- datasette_events_forward-0.1a1.dist-info/METADATA,sha256=ySmMxoK3r0ThhrjZ52tifqDbmQy2ynRAMdZaFBlevsY,4165
4
- datasette_events_forward-0.1a1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
5
- datasette_events_forward-0.1a1.dist-info/entry_points.txt,sha256=gA9e336VTQukKzZ31P5fcujufJVRjNCqbOrQco5xQ-Q,54
6
- datasette_events_forward-0.1a1.dist-info/top_level.txt,sha256=hcEFDCsbPWOqo39qf1PpGpWEqFsGk6wrZOTbR24TYqM,25
7
- datasette_events_forward-0.1a1.dist-info/RECORD,,