Skip to content

Commit

Permalink
[App/Feature] HTTP Queues (#14978)
Browse files Browse the repository at this point in the history
[App/Feature] HTTP Queues (#14978)
  • Loading branch information
Sherin Thomas authored and nicolai86 committed Oct 13, 2022
1 parent 604edf2 commit 4ba9561
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lightning_app/CHANGELOG.md
Expand Up @@ -14,6 +14,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added support for running the works without cloud compute in the default container ([#14819](https://github.com/Lightning-AI/lightning/pull/14819))
- Added an HTTPQueue as an optional replacement for the default redis queue ([#14978](https://github.com/Lightning-AI/lightning/pull/14978)

- Introduce HTTPQueue as an optional replacement for the default redis queue ([#14978](https://github.com/Lightning-AI/lightning/pull/14978)

### Changed


Expand Down
1 change: 0 additions & 1 deletion src/lightning_app/core/constants.py
Expand Up @@ -64,4 +64,3 @@ def get_lightning_cloud_url() -> str:

DEBUG: bool = lightning_cloud.env.DEBUG
DEBUG_ENABLED = bool(int(os.getenv("LIGHTNING_DEBUG", "0")))

5 changes: 5 additions & 0 deletions src/lightning_app/core/queues.py
Expand Up @@ -375,6 +375,11 @@ def length(self):
val = self.client.get(f"/v1/{self.app_id}/{self.name}/length")
return int(val.text)

@property
def is_running(self) -> bool:
resp = self.client.get("/healthz")
return resp.status_code == 200

@staticmethod
def _split_app_id_and_queue_name(queue_name):
"""This splits the app id and the queue name into two parts.
Expand Down

0 comments on commit 4ba9561

Please sign in to comment.