tableau / TabPy

Execute Python code on the fly and display results in Tableau visualizations:
https://tableau.github.io/TabPy/
MIT License
1.57k stars 599 forks source link

Daemon mode? #23

Closed astewart-twist closed 7 years ago

astewart-twist commented 7 years ago

Does TabPy currently have some sort of daemon mode built in? If not, what's the current recommended practice - screen/tmux? Docker container?

BBeran commented 7 years ago

On Mac, Linux instead of this

./startup.sh

you can start it this way if you want to write to a log file

nohup ./startup.sh 0<&- &> my.log.file &

if you don't want to write errors to a log file

nohup ./startup.sh 0<&- &>/dev/null &

On Windows you can use the method described here for RServe that uses Windows shell script

https://community.tableau.com/docs/DOC-9916

rvschaffer commented 3 years ago

To run TabPy in Virtual Environment, the file startup.sh' contents would be: source my-tabpy-env/bin/activate tabpy Is this correct?

rvschaffer commented 3 years ago

How do you stop the service later? I tried to deactivate the virtual environment a few days later, and it says: -bash: deactivate: command not found

0golovatyi commented 3 years ago

@rvschaffer For "background" service on Linux/mac check screen command - https://linux.die.net/man/1/screen. For Windows read this - http://tabscifi.golovatyi.info/2021/01/how-to-run-tabpy-as-windows-service/

deactivate command is for virtual environment, not for service itself. Some reading on that - http://tabscifi.golovatyi.info/2020/11/running-tabpy-with-python-virtual-environment/.