Basically, what I am trying to do is to start my django application.
Before I can do runserver
, I need to start mongodb
and redis
by running mongod
and redis-server
respectively.
So, I though I could automate this instead of doing it every time.
My fabric function looks something like this:
def start_project():
local("mongod")
local("redis-server")
But once it starts mongod
the tab becomes busy and it will not execute redis-server
.
Now, is it possible that I can do something like this?:
def start_meraki():
local("mongod")
open_another_tab() # what can I do here?
local("redis-server")
P.S. I am using Ubuntu 14.04
Not sure what you mean by "another tab" but I think you get stuck because python waits for the process to complete which is in the infinite loop. You need to detach the process from python after starting it. If I want Firefox to open another page in a separate tab I do like this: