Changeset - 047cc1b40374
[Not reviewed]
default
1 2 0
Dennis Fink - 3 years ago 2022-07-19 19:18:33
dennis.fink@c3l.lu
Remove state endpoint
3 files changed with 2 insertions and 35 deletions:
0 comments (0 inline, 0 general)
spaceapi/__init__.py
Show inline comments
 
@@ -91,10 +91,6 @@ def create_app():
 

	
 
    app.register_blueprint(root_views)
 

	
 
    from .state import state_views
 

	
 
    app.register_blueprint(state_views, url_prefix="/state")
 

	
 
    from .sensors import sensors_views
 

	
 
    app.register_blueprint(sensors_views, url_prefix="/sensors")
spaceapi/state.py
Show inline comments
 
deleted file
spaceapi/utils.py
Show inline comments
 
@@ -5,7 +5,7 @@ import os.path
 
import random
 
import smtplib
 
import ssl
 
from functools import partial, wraps
 
from functools import partial
 
from time import time
 

	
 
import mastodon
 
@@ -44,7 +44,6 @@ possible_closed_messages = (
 
    "Dream of electric sheeps! We are closed!",
 
)
 

	
 
get_identification_key = partial(first, keys=frozenset(("name", "location")))
 

	
 
RADIATON_SUBKEYS = frozenset(("alpha", "beta", "gamma", "beta_gamma"))
 

	
 
@@ -291,12 +290,4 @@ def first(iterable, keys):
 
    raise ValueError
 

	
 

	
 
def pass_active_status(f):
 
    @wraps(f)
 
    def wrapper(*args, **kwargs):
 
        status = ActiveStatusv14()
 
        rv = f(status, *args, **kwargs)
 
        status.save_last_state()
 
        return rv
 

	
 
    return wrapper
 
get_identification_key = partial(first, keys=frozenset(("name", "location")))
0 comments (0 inline, 0 general)