Answer the question
In order to leave comments, you need to log in
How can I pass information between two running files from Procfile Heroku?
I need Heroku hosting to pass information between two running files, one responsible for the discord bot, and the other for the website on which the discord bot will be configured.
The website should take information from another file that is connected to the discord bot using the discord-ext library -ipc, but it does not do this on the hosting
Procfile:
worker: python bot.py
web: gunicorn -k uvicorn.workers.UvicornWorker main:app
21-12-09T17:16:43.379263+00:00 app[web.1]: File "/app/main.py", line 53, in dashboard
2021-12-09T17:16:43.379263+00:00 app[web.1]: guild_count = await ipc_client.request("get_guild_count")
2021-12-09T17:16:43.379266+00:00 app[web.1]: raise client_error(req.connection_key, exc) from exc
2021-12-09T17:16:43.379267+00:00 app[web.1]: aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host localhost:20000 ssl:default [Connect call failed ('127.0.0.1', 20000)]
web: python bot.py & gunicorn -k uvicorn.workers.UvicornWorker main:app & wait -n
Answer the question
In order to leave comments, you need to log in
The 2 Dynos in Heroku can communicate via TCP/IP, so depending on what kind of communication is needed, I would choose one of:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question