tinybird 0.0.1.dev309__py3-none-any.whl → 0.0.1.dev310__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 tinybird might be problematic. Click here for more details.
- tinybird/tb/__cli__.py +2 -2
- tinybird/tb/modules/dev_server.py +17 -3
- {tinybird-0.0.1.dev309.dist-info → tinybird-0.0.1.dev310.dist-info}/METADATA +1 -1
- {tinybird-0.0.1.dev309.dist-info → tinybird-0.0.1.dev310.dist-info}/RECORD +7 -7
- {tinybird-0.0.1.dev309.dist-info → tinybird-0.0.1.dev310.dist-info}/WHEEL +0 -0
- {tinybird-0.0.1.dev309.dist-info → tinybird-0.0.1.dev310.dist-info}/entry_points.txt +0 -0
- {tinybird-0.0.1.dev309.dist-info → tinybird-0.0.1.dev310.dist-info}/top_level.txt +0 -0
tinybird/tb/__cli__.py
CHANGED
|
@@ -4,5 +4,5 @@ __description__ = 'Tinybird Command Line Tool'
|
|
|
4
4
|
__url__ = 'https://www.tinybird.co/docs/forward/commands'
|
|
5
5
|
__author__ = 'Tinybird'
|
|
6
6
|
__author_email__ = 'support@tinybird.co'
|
|
7
|
-
__version__ = '0.0.1.
|
|
8
|
-
__revision__ = '
|
|
7
|
+
__version__ = '0.0.1.dev310'
|
|
8
|
+
__revision__ = '8861705'
|
|
@@ -6,6 +6,7 @@ from pathlib import Path
|
|
|
6
6
|
from typing import Callable, Optional
|
|
7
7
|
|
|
8
8
|
import click
|
|
9
|
+
import requests
|
|
9
10
|
|
|
10
11
|
from tinybird.tb.client import TinyB
|
|
11
12
|
from tinybird.tb.modules.common import sys_exit
|
|
@@ -51,8 +52,21 @@ class DevServer(http.server.HTTPServer):
|
|
|
51
52
|
)
|
|
52
53
|
except OSError as e:
|
|
53
54
|
if e.errno == 48: # Address already in use
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
dev_server_already_running = False
|
|
56
|
+
try:
|
|
57
|
+
response = requests.get(f"http://localhost:{port}")
|
|
58
|
+
if response.status_code == 200 and "Tinybird Dev Server" in response.text:
|
|
59
|
+
dev_server_already_running = True
|
|
60
|
+
except Exception:
|
|
61
|
+
pass
|
|
62
|
+
if dev_server_already_running:
|
|
63
|
+
message = f"Dev server is already running on http://localhost:{port}. Skipping..."
|
|
64
|
+
click.echo(FeedbackManager.warning(message=message))
|
|
65
|
+
sys_exit("dev_server_already_running", message)
|
|
66
|
+
else:
|
|
67
|
+
message = f"Port {port} is already in use. Check if another instance of the server is running or release the port."
|
|
68
|
+
click.echo(FeedbackManager.error(message=message))
|
|
69
|
+
sys_exit("port_in_use", message)
|
|
56
70
|
else:
|
|
57
71
|
click.echo(FeedbackManager.error_exception(error=e))
|
|
58
72
|
sys_exit("server_error", str(e))
|
|
@@ -240,7 +254,7 @@ def start_server(project: Project, tb_client: TinyB, process: Callable, build_st
|
|
|
240
254
|
"""
|
|
241
255
|
|
|
242
256
|
try:
|
|
243
|
-
click.echo(FeedbackManager.highlight(message="
|
|
257
|
+
click.echo(FeedbackManager.highlight(message="» Starting Tinybird dev server..."))
|
|
244
258
|
|
|
245
259
|
# Create and start the server
|
|
246
260
|
server = DevServer(process, project, build_status, tb_client)
|
|
@@ -18,7 +18,7 @@ tinybird/datafile/exceptions.py,sha256=8rw2umdZjtby85QbuRKFO5ETz_eRHwUY5l7eHsy1w
|
|
|
18
18
|
tinybird/datafile/parse_connection.py,sha256=tRyn2Rpr1TeWet5BXmMoQgaotbGdYep1qiTak_OqC5E,1825
|
|
19
19
|
tinybird/datafile/parse_datasource.py,sha256=ssW8QeFSgglVFi3sDZj_HgkJiTJ2069v2JgqnH3CkDE,1825
|
|
20
20
|
tinybird/datafile/parse_pipe.py,sha256=8e9LMecSQVWHC4AXf8cdxoQ1nxUR4fTObYxTctO_EXQ,3816
|
|
21
|
-
tinybird/tb/__cli__.py,sha256=
|
|
21
|
+
tinybird/tb/__cli__.py,sha256=PsaXQzmkEgsfLDtULkAsUwi2_fl1jOdNztKb1bHvnR0,247
|
|
22
22
|
tinybird/tb/check_pypi.py,sha256=Gp0HkHHDFMSDL6nxKlOY51z7z1Uv-2LRexNTZSHHGmM,552
|
|
23
23
|
tinybird/tb/cli.py,sha256=Os4uApzYYVPXcYFdaReQs9E12q9DOuYOUVFoOgt7i7U,1047
|
|
24
24
|
tinybird/tb/client.py,sha256=VYbllzIsmBS4b56Ix-vsyLbhpbe7MVRxR1sIo6xU2qA,53544
|
|
@@ -36,7 +36,7 @@ tinybird/tb/modules/datasource.py,sha256=pExdYfLQ5e88RqgJ-dbd30k1TJ4LDb_POtSc7fn
|
|
|
36
36
|
tinybird/tb/modules/deployment.py,sha256=v0layOmG0IMnuXc3RT39mpGfa5M8yPlrL9F089fJFCo,15964
|
|
37
37
|
tinybird/tb/modules/deployment_common.py,sha256=68qoCoOQFqRFyvxWwYmKiuVb37z7txBhEvzSOJGUHMc,20664
|
|
38
38
|
tinybird/tb/modules/deprecations.py,sha256=rrszC1f_JJeJ8mUxGoCxckQTJFBCR8wREf4XXXN-PRc,4507
|
|
39
|
-
tinybird/tb/modules/dev_server.py,sha256=
|
|
39
|
+
tinybird/tb/modules/dev_server.py,sha256=4PzRoE47vrHJ2ccdA57fd03r4KDgCz4EcayW52gZlA0,10881
|
|
40
40
|
tinybird/tb/modules/endpoint.py,sha256=ksRj6mfDb9Xv63PhTkV_uKSosgysHElqagg3RTt21Do,11958
|
|
41
41
|
tinybird/tb/modules/environment.py,sha256=z99321d_imk3eLJx9JNZIWMVcaRPUNixUV8pom4OL5o,5724
|
|
42
42
|
tinybird/tb/modules/exceptions.py,sha256=_1BHy0OixEkeF0fOCu1_1Pj8pJS4BNfUyucqCViJGTw,5958
|
|
@@ -122,8 +122,8 @@ tinybird/tb_cli_modules/config.py,sha256=IsgdtFRnUrkY8-Zo32lmk6O7u3bHie1QCxLwgp4
|
|
|
122
122
|
tinybird/tb_cli_modules/exceptions.py,sha256=pmucP4kTF4irIt7dXiG-FcnI-o3mvDusPmch1L8RCWk,3367
|
|
123
123
|
tinybird/tb_cli_modules/regions.py,sha256=QjsL5H6Kg-qr0aYVLrvb1STeJ5Sx_sjvbOYO0LrEGMk,166
|
|
124
124
|
tinybird/tb_cli_modules/telemetry.py,sha256=Hh2Io8ZPROSunbOLuMvuIFU4TqwWPmQTqal4WS09K1A,10449
|
|
125
|
-
tinybird-0.0.1.
|
|
126
|
-
tinybird-0.0.1.
|
|
127
|
-
tinybird-0.0.1.
|
|
128
|
-
tinybird-0.0.1.
|
|
129
|
-
tinybird-0.0.1.
|
|
125
|
+
tinybird-0.0.1.dev310.dist-info/METADATA,sha256=8rqBQagupBkyWHMUi5ITIFqonzEIFUXPRVTFKSpkRKM,1881
|
|
126
|
+
tinybird-0.0.1.dev310.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
127
|
+
tinybird-0.0.1.dev310.dist-info/entry_points.txt,sha256=LwdHU6TfKx4Qs7BqqtaczEZbImgU7Abe9Lp920zb_fo,43
|
|
128
|
+
tinybird-0.0.1.dev310.dist-info/top_level.txt,sha256=VqqqEmkAy7UNaD8-V51FCoMMWXjLUlR0IstvK7tJYVY,54
|
|
129
|
+
tinybird-0.0.1.dev310.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|