appmesh 1.6.6__py3-none-any.whl → 1.6.7__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.
appmesh/server_http.py CHANGED
@@ -58,13 +58,13 @@ class AppMeshServer(metaclass=abc.ABCMeta):
58
58
  @staticmethod
59
59
  def _get_runtime_env() -> Tuple[str, str]:
60
60
  """Read and validate required runtime environment variables."""
61
- process_id = os.getenv("APP_MESH_PROCESS_KEY")
61
+ process_key = os.getenv("APP_MESH_PROCESS_KEY")
62
62
  app_name = os.getenv("APP_MESH_APPLICATION_NAME")
63
- if not process_id:
63
+ if not process_key:
64
64
  raise Exception("Missing environment variable: APP_MESH_PROCESS_KEY. This must be set by App Mesh service.")
65
65
  if not app_name:
66
66
  raise Exception("Missing environment variable: APP_MESH_APPLICATION_NAME. This must be set by App Mesh service.")
67
- return process_id, app_name
67
+ return process_key, app_name
68
68
 
69
69
  def task_fetch(self) -> Union[str, bytes]:
70
70
  """Fetch task data in the currently running App Mesh application process.
@@ -76,14 +76,14 @@ class AppMeshServer(metaclass=abc.ABCMeta):
76
76
  Returns:
77
77
  Union[str, bytes]: The payload provided by the client as returned by the service.
78
78
  """
79
- process_id, app_name = self._get_runtime_env()
79
+ pkey, app_name = self._get_runtime_env()
80
80
  path = f"/appmesh/app/{app_name}/task"
81
81
 
82
82
  while True:
83
83
  resp = self._client._request_http(
84
84
  AppMeshClient.Method.GET,
85
85
  path=path,
86
- query={"process_uuid": process_id},
86
+ query={"process_key": pkey},
87
87
  )
88
88
 
89
89
  if resp.status_code != HTTPStatus.OK:
@@ -102,13 +102,13 @@ class AppMeshServer(metaclass=abc.ABCMeta):
102
102
  Args:
103
103
  result (Union[str, bytes]): Result payload to be delivered back to the client.
104
104
  """
105
- process_id, app_name = self._get_runtime_env()
105
+ pkey, app_name = self._get_runtime_env()
106
106
  path = f"/appmesh/app/{app_name}/task"
107
107
 
108
108
  resp = self._client._request_http(
109
109
  AppMeshClient.Method.PUT,
110
110
  path=path,
111
- query={"process_uuid": process_id},
111
+ query={"process_key": pkey},
112
112
  body=result,
113
113
  )
114
114
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: appmesh
3
- Version: 1.6.6
3
+ Version: 1.6.7
4
4
  Summary: Client SDK for App Mesh
5
5
  Home-page: https://github.com/laoshanxi/app-mesh
6
6
  Author: laoshanxi
@@ -6,11 +6,11 @@ appmesh/appmesh_client.py,sha256=ywB2222PtJUffdfdxZcBfdhZs1KYyc7JvzMxwuK2qyI,378
6
6
  appmesh/client_http.py,sha256=dzNZvMztm0POLHNS8iNHo1iuJprjvQP0kii1UWOH-XA,57529
7
7
  appmesh/client_http_oauth.py,sha256=1d51o0JX_xtB8d2bEuM7_XJHcwMnhcjkbIq7GE1Zxm8,6120
8
8
  appmesh/client_tcp.py,sha256=aq6UUzytZA4ibE9WQMMWdo1uW8sHETEhJjsbM6IYSno,11457
9
- appmesh/server_http.py,sha256=H6DfMhU2NxlBqxjmRG2C8NXMaGDxy_5QVyBmaVrelfI,4322
9
+ appmesh/server_http.py,sha256=rBIYO9rbR-r3x1Jcry440Sp--IM-OWKRaOhNpGdkxh8,4299
10
10
  appmesh/server_tcp.py,sha256=-CU5tw97WJmDcUNsNPWqpdZ0wxRzRD6kUP3XyNZUTHc,1444
11
11
  appmesh/tcp_messages.py,sha256=H9S_iCy0IuufY2v50_SUgRvcyQmJsySG65tBe_xb3Ko,1878
12
12
  appmesh/tcp_transport.py,sha256=0hRSp5fpL9wKB05JIyIRIuyBC8w1IdokryhMDHqtN4M,8946
13
- appmesh-1.6.6.dist-info/METADATA,sha256=2zvQG43uxfAhmT0v4e-_jyfQJT5veka--K-3Zeokqyw,11828
14
- appmesh-1.6.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- appmesh-1.6.6.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
16
- appmesh-1.6.6.dist-info/RECORD,,
13
+ appmesh-1.6.7.dist-info/METADATA,sha256=9c0FJtxDPsRIu2CL3K4A7IkAAKLalRm0cpdbBk_j-6A,11828
14
+ appmesh-1.6.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ appmesh-1.6.7.dist-info/top_level.txt,sha256=-y0MNQOGJxUzLdHZ6E_Rfv5_LNCkV-GTmOBME_b6pg8,8
16
+ appmesh-1.6.7.dist-info/RECORD,,