krypton201
krypton201
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
I have another question. I am trying to use the RediSearch module (https://redis.io/docs/stack/search/) to perform a query against the redis storage. However, when I run my code, I get this error:
redis.exceptions.ResponseError: unknown command `FT.SEARCH`, with args beginning with: `courses_index`, `operating systems`, `VERBATIM`, `LIMIT`, `0`, `10`,
redis.exceptions.ResponseError: unknown command `FT.SEARCH`, with args beginning with: `courses_index`, `operating systems`, `VERBATIM`, `LIMIT`, `0`, `10`,
in the railway api console which seems to occur when the redisearch library is not properly installed. I have RediSearch in my requirements.txt file, so any help would be appreciated.
39 replies
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
39 replies
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
wow that was much easier than i expected, thx @Brody
39 replies
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
got it
39 replies
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
what's wrong with using a .env file?
39 replies
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
ah ok
39 replies
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
like add the variables directly on the railway dashboard?
39 replies
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
39 replies
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
Thanks that fixed it. Last question: is there anyway to change the value of REDIS_PASSWORD? I hard coded the value in my main.py file instead of using .env variables and accidently pushed to github (its in a private repo so its fine for now).
39 replies
RRailway
Created by krypton201 on 6/12/2023 in #✋|help
Issue with Flask Deployment
So there's no way to run redis as a subprocess under the main flask process on a separate port? I have a function that starts the redis server:
def start_redis_server():
print("test")
redis_process = subprocess.Popen(['redis-server'])
def start_redis_server():
print("test")
redis_process = subprocess.Popen(['redis-server'])
and I call that function in
if __name__ == '__main__
if __name__ == '__main__
` but it doesn't seem to be even running anything in if name = main. When I deploy to railway, I get this error:
FileNotFoundError: [Errno 2] No such file or directory: 'redis-server'
FileNotFoundError: [Errno 2] No such file or directory: 'redis-server'
39 replies