# Donato **Repository Path**: uchang/donato ## Basic Information - **Project Name**: Donato - **Description**: wechat robot by Python - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-06-05 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Donato wechat bot ## Depends read requirements.txt ## Environment Build pip install virtualenv virtualenv -p /usr/bin/python2.7 --no-site-packages venv source ./venv/bin/activate pip install -r requirements.txt !!!Now we need a Redis server !!! For mac user, specific sqlachemy config is needed ## Database run db.sql <<<<<<< HEAD ======= table schema will be created when bot runs >>>>>>> eb56564547033adb8b115b0231789bce64a7d121 ## Config modify the config.py or add new config in it using the envirenment variable if you are not using supervisor or uwsgi export DONATO_PROFILE="Dev" ## Run nohup python bot.py & use the wechat app on your cell phone to scan the qrcode in donato/static/QR.png nohup rqworker -c settings ## Monitor redis queue rq-dashboard --port 8235 --username admin --password 132465 --redis-host 127.0.0.1 --redis-port 6379 --redis-password holysheet --redis-database 3 # Steps to set up supervisor ## install supervisor sudo easy_install supervisor / sudo pip install supervisor ## write supervisor config file echo_supervisord_conf | sudo tee /etc/supervisord.conf edit /etc/supervisord.conf [include] files = /etc/supervisord.d/*.conf ## mkdir sudo mkdir /etc/supervisord.d ## create symbolic link sudo cp sms_job_supervisor.conf /etc/supervisord.d/ ## modify variable 'directory' in /etc/supervisord.d/ to this app 's real path sudo vim /etc/supervisord.d/sms_job_supervisor.conf directory=/data/git_repo/Donato ## restart supervisord sudo supervisord ## update sudo supervisorctl update ## restart bot_job sudo supervisorctl restart bot_job ## if supervisor can not start sms_job, you should check supervisor log file cat /tmp/supervisord.log cat bot_stderr.log