Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tentative to survive to servers outage by simply disabling Ws when servers are down #112

Merged
merged 1 commit into from Jan 17, 2024

Conversation

jeandet
Copy link
Member

@jeandet jeandet commented Dec 23, 2023

This PR is a proposition to keep speasy usable if any server/WS is down only losing associated features.

…rver

are down

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
@jeandet jeandet added the enhancement New feature or request label Dec 23, 2023
@jeandet jeandet added this to the 1.3.0 milestone Dec 23, 2023
@@ -11,6 +11,7 @@
from .utils import get_parameter_args
from ...config import amda as amda_cfg
from ...core import AllowedKwargs, make_utc_datetime
from ...core.http import is_server_up

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'is_server_up' is not used.
try:
r = http.get(f"{proxy_cfg.url()}/get_inventory", params={"provider": "ssc"}, timeout=1)
return r.status_code == 200
except: # lgtm [py/catch-base-exception]

Check notice

Code scanning / CodeQL

Except block handles 'BaseException' Note

Except block directly handles BaseException.
try:
r = send_request(Endpoint.AUTH, server_url=server_url, timeout=1)
return r is not None
except: # lgtm [py/catch-base-exception]

Check notice

Code scanning / CodeQL

Except block handles 'BaseException' Note

Except block directly handles BaseException.

from speasy.core.http import is_server_up

_HERE_ = os.path.dirname(os.path.abspath(__file__))

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable '_HERE_' is not used.
@jeandet jeandet merged commit e7b30df into SciQLop:main Jan 17, 2024
3 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants