Skip to content

Commit

Permalink
Clean diff for #342
Browse files Browse the repository at this point in the history
  • Loading branch information
computermacgyver committed Oct 25, 2023
1 parent e3f2bd3 commit bd14839
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/main/lib/shared_models/shared_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def get_servers():
@staticmethod
def get_client(model_key, options={}):
r = redis.Redis(host=app.config['REDIS_HOST'], port=app.config['REDIS_PORT'], db=app.config['REDIS_DATABASE'])
model_class = json.loads(r.get('SharedModel:%s' % model_key).decode('utf-8'))['model_class']
model_info = r.get("SharedModel:%s" % model_key)
assert model_info is not None, f"Unable locate model info for key {model_key}"
model_class = json.loads(model_info.decode('utf-8'))['model_class']
class_ = SharedModel.import_model_class(model_class)
return class_(model_key, options)

Expand Down

0 comments on commit bd14839

Please sign in to comment.