CheeseAPI 2.0.8b2__tar.gz → 2.0.8b3__tar.gz

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.
@@ -150,7 +150,7 @@ class AppRoute(Route):
150
150
  self._routes: dict[str, dict[HTTP_METHOD_TYPE, RouteDict]] = {}
151
151
  self._patterns: list[Pattern] = [
152
152
  {
153
- 'pattern': re.compile(r'-?(0|[1-9]\d*)'),
153
+ 'pattern': re.compile(r'-?(?:0|[1-9]\d*)'),
154
154
  'weight': 5,
155
155
  'type': int,
156
156
  'key': 'int'
@@ -300,7 +300,7 @@ class SchedulerProxy:
300
300
 
301
301
  def add(self, interval_time: float, fn: Callable | None = None, *, first_run_timer: datetime.datetime | None = None, expected_run_num: int | None = None, key: str | None = None, run_type: Literal['THREAD', 'PROCESS'] = 'THREAD', args: tuple = (), kwargs: dict = {}, auto_remove: bool = False, timeout: float | None = None) -> Callable | Task:
302
302
  if fn:
303
- if not self._pubsub_ready:
303
+ if self.app.sync_server_url and not self._pubsub_ready:
304
304
  self._pubsub_ready = True
305
305
  threading.Thread(target = self._start_pubsub, args = (self.app,), daemon = True).start()
306
306
  coro = self._async_start_pubsub(self.app)
@@ -329,7 +329,7 @@ class SchedulerProxy:
329
329
 
330
330
  async def async_add(self, interval_time: float | None = None, fn: Callable | None = None, *, first_run_timer: datetime.datetime | None = None, expected_run_num: int | None = None, key: str | None = None, args: tuple = (), kwargs: dict = {}, auto_remove: bool = False, timeout: float | None = None) -> Callable | Task:
331
331
  if fn is not None:
332
- if not self._pubsub_ready:
332
+ if self.app.sync_server_url and not self._pubsub_ready:
333
333
  self._pubsub_ready = True
334
334
  threading.Thread(target = self._start_pubsub, args = (self.app,), daemon = True).start()
335
335
  coro = self._async_start_pubsub(self.app)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: CheeseAPI
3
- Version: 2.0.8b2
3
+ Version: 2.0.8b3
4
4
  Summary: 一款web协程框架
5
5
  Project-URL: Source, https://github.com/CheeseUnknown/CheeseAPI
6
6
  Author-email: Cheese Unknown <cheese@cheese.ren>
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "CheeseAPI"
7
- version = "2.0.8-beta.2"
7
+ version = "2.0.8-beta.3"
8
8
  description = "一款web协程框架"
9
9
  readme = "README.md"
10
10
  license-files = { paths = [ "LICENSE" ] }
File without changes
File without changes
File without changes