railway connect Redis fail
I'm trying to connect my flask website to a redis database and I'm getting the error message "Unrecognized option or bad number of args for: '-u'". I've downloaded the redis-cli from github (v3.0.504) https://github.com/microsoftarchive/redis/releases, I extracted it into my Program files as a folder, added it as a path, and ran redis-server. Please help! I'm very new to railway and databases in general.
11 Replies
Project ID:
27db0d6b-91da-4416-9087-7d15bdbdfacb
27db0d6b-91da-4416-9087-7d15bdbdfacb
why is the redis-cli required for a python app to connect to the redis database?
I'm not sure. I was just doing what I did when I connected to my postgres database. My purpose for using redis is that I want to have it run a script (such as web scraping) once a day, and I read online that I need to use redis and celery to make that work. Am I correct in this assumption? And do I need to use redis-cli? Like I said I'm new to this stuff so any advice would be appreciated π
im sorry to burst your bubble but web scraping is a big grey area on railway, its even in the tos
I'm scraping data from the nhl api, not just from websites. Is that okay?
https://statsapi.web.nhl.com/api/v1/teams/10/roster
thats an api, that has nothing to do with scraping, youre good
but to answer your question, i dont see the need for redis or celery depending on what youre doing with the data, you can just use railway's native cron feature
so what are youp doing with this data?
My goal is to collect up to date nhl stats, probably once a day, put it in a database, and then allow the user to look up players on my website and see relevant stats and trends on that player. The main thing I don't know how to do is running the "scraping" (not scraping) code automatically every day without me having to do anything or use my laptop. Is that something the cron would be able to do?
thats absolutely what cron is able to do
https://docs.railway.app/reference/cron-jobs
well you still have to write all the code, you just set the cron expression to run your code once per day
Wow! Thanks so much. You just saved me a lot of time π
no problem!