Development FAQ
Batch execution, deployments or pipelines hang without output in a manual install
Batch execution, file distribution, application deployment and pipelines depend on the worker service. Start it as follows (paths follow the development setup guide):
cd /data/spug/spug_api
source venv/bin/activate
python manage.py runworker
Real-time output also needs the WebSocket service. In development python manage.py runserver serves both HTTP and WebSocket through daphne, so nothing else is required.
Scheduled tasks never run in a manual install
Scheduled tasks need an additional service:
cd /data/spug/spug_api
source venv/bin/activate
python manage.py runscheduler
python manage.py runworker
Monitoring checks never run in a manual install
Monitoring needs an additional service:
cd /data/spug/spug_api
source venv/bin/activate
python manage.py runmonitor
python manage.py runworker
Using MySQL instead of SQLite on macOS
Install the mysqlclient driver:
brew install mysql-client
export PATH="/usr/local/opt/mysql-client/bin:$PATH"
export LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib"
pip install mysqlclient
How do I add translations for UI text?
Spug uses the Chinese text as the translation key. The English dictionaries live in spug_web/src/locales/en/, split by module and merged in index.js; base.js holds shared terms and always wins.
Wrap user-visible text in t('中文') in the page code and add the English value to the dictionary of that module. Back-end error messages and option labels are translated in spug_api/libs/locale.py.