How can I run two scripts on Heroku?
up vote
-1
down vote
favorite
I'm building a Dash Webapp, I have two Python scripts: one is the main Dash app and the other script is supposed to retrieve data.
Since I can't "merge" my two scripts on one, I decided to have the second script send my data to a Database while the Dash script receives this data with a DB query.
Now I need to deploy it online and have both the scripts running in parallel, since one will feed data to the DB and the other one will fetch this data and chart it on a webpage, but is it possible to run at once two Python files in parallel? Can I do it on a single dyno or should I use two different apps (one for the webapp and another one for the data)?
python heroku
add a comment |
up vote
-1
down vote
favorite
I'm building a Dash Webapp, I have two Python scripts: one is the main Dash app and the other script is supposed to retrieve data.
Since I can't "merge" my two scripts on one, I decided to have the second script send my data to a Database while the Dash script receives this data with a DB query.
Now I need to deploy it online and have both the scripts running in parallel, since one will feed data to the DB and the other one will fetch this data and chart it on a webpage, but is it possible to run at once two Python files in parallel? Can I do it on a single dyno or should I use two different apps (one for the webapp and another one for the data)?
python heroku
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I'm building a Dash Webapp, I have two Python scripts: one is the main Dash app and the other script is supposed to retrieve data.
Since I can't "merge" my two scripts on one, I decided to have the second script send my data to a Database while the Dash script receives this data with a DB query.
Now I need to deploy it online and have both the scripts running in parallel, since one will feed data to the DB and the other one will fetch this data and chart it on a webpage, but is it possible to run at once two Python files in parallel? Can I do it on a single dyno or should I use two different apps (one for the webapp and another one for the data)?
python heroku
I'm building a Dash Webapp, I have two Python scripts: one is the main Dash app and the other script is supposed to retrieve data.
Since I can't "merge" my two scripts on one, I decided to have the second script send my data to a Database while the Dash script receives this data with a DB query.
Now I need to deploy it online and have both the scripts running in parallel, since one will feed data to the DB and the other one will fetch this data and chart it on a webpage, but is it possible to run at once two Python files in parallel? Can I do it on a single dyno or should I use two different apps (one for the webapp and another one for the data)?
python heroku
python heroku
edited Nov 9 at 21:14
petezurich
3,37881633
3,37881633
asked Nov 9 at 20:53
Jack022
810
810
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Check this. It says:
The quickest way maybe to list the commands to run, each followed by
an&
, with await -n
in the end, in theProcfile
, e.g.:
web: puma -C config/puma.rb & sidekiq & wait -n
I'll try this, thanks!
– Jack022
Nov 9 at 22:29
1
@Jack022 ok. Let me know if it works. Also try to define multiple workers in your Procfile, check this
– Cheche
Nov 9 at 22:33
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Check this. It says:
The quickest way maybe to list the commands to run, each followed by
an&
, with await -n
in the end, in theProcfile
, e.g.:
web: puma -C config/puma.rb & sidekiq & wait -n
I'll try this, thanks!
– Jack022
Nov 9 at 22:29
1
@Jack022 ok. Let me know if it works. Also try to define multiple workers in your Procfile, check this
– Cheche
Nov 9 at 22:33
add a comment |
up vote
1
down vote
accepted
Check this. It says:
The quickest way maybe to list the commands to run, each followed by
an&
, with await -n
in the end, in theProcfile
, e.g.:
web: puma -C config/puma.rb & sidekiq & wait -n
I'll try this, thanks!
– Jack022
Nov 9 at 22:29
1
@Jack022 ok. Let me know if it works. Also try to define multiple workers in your Procfile, check this
– Cheche
Nov 9 at 22:33
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Check this. It says:
The quickest way maybe to list the commands to run, each followed by
an&
, with await -n
in the end, in theProcfile
, e.g.:
web: puma -C config/puma.rb & sidekiq & wait -n
Check this. It says:
The quickest way maybe to list the commands to run, each followed by
an&
, with await -n
in the end, in theProcfile
, e.g.:
web: puma -C config/puma.rb & sidekiq & wait -n
answered Nov 9 at 21:53
Cheche
780118
780118
I'll try this, thanks!
– Jack022
Nov 9 at 22:29
1
@Jack022 ok. Let me know if it works. Also try to define multiple workers in your Procfile, check this
– Cheche
Nov 9 at 22:33
add a comment |
I'll try this, thanks!
– Jack022
Nov 9 at 22:29
1
@Jack022 ok. Let me know if it works. Also try to define multiple workers in your Procfile, check this
– Cheche
Nov 9 at 22:33
I'll try this, thanks!
– Jack022
Nov 9 at 22:29
I'll try this, thanks!
– Jack022
Nov 9 at 22:29
1
1
@Jack022 ok. Let me know if it works. Also try to define multiple workers in your Procfile, check this
– Cheche
Nov 9 at 22:33
@Jack022 ok. Let me know if it works. Also try to define multiple workers in your Procfile, check this
– Cheche
Nov 9 at 22:33
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233129%2fhow-can-i-run-two-scripts-on-heroku%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown