moved
This commit is contained in:
50
email-worker/Makefile
Normal file
50
email-worker/Makefile
Normal file
@@ -0,0 +1,50 @@
|
||||
.PHONY: help install run test lint clean docker-build docker-run docker-stop docker-logs
|
||||
|
||||
help:
|
||||
@echo "Available commands:"
|
||||
@echo " make install - Install dependencies"
|
||||
@echo " make run - Run worker locally"
|
||||
@echo " make test - Run tests (TODO)"
|
||||
@echo " make lint - Run linting"
|
||||
@echo " make clean - Clean up files"
|
||||
@echo " make docker-build - Build Docker image"
|
||||
@echo " make docker-run - Run with docker-compose"
|
||||
@echo " make docker-stop - Stop docker-compose"
|
||||
@echo " make docker-logs - Show docker logs"
|
||||
|
||||
install:
|
||||
pip install -r requirements.txt
|
||||
|
||||
run:
|
||||
python3 main.py
|
||||
|
||||
test:
|
||||
@echo "TODO: Add tests"
|
||||
# python3 -m pytest tests/
|
||||
|
||||
lint:
|
||||
@echo "Running pylint..."
|
||||
-pylint --rcfile=.pylintrc *.py **/*.py 2>/dev/null || echo "pylint not installed"
|
||||
@echo "Running flake8..."
|
||||
-flake8 --max-line-length=120 . 2>/dev/null || echo "flake8 not installed"
|
||||
|
||||
clean:
|
||||
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
|
||||
find . -type f -name "*.pyc" -delete
|
||||
find . -type f -name "*.pyo" -delete
|
||||
find . -type f -name "*.log" -delete
|
||||
|
||||
docker-build:
|
||||
docker build -t unified-email-worker:latest .
|
||||
|
||||
docker-run:
|
||||
docker-compose up -d
|
||||
|
||||
docker-stop:
|
||||
docker-compose down
|
||||
|
||||
docker-logs:
|
||||
docker-compose logs -f email-worker
|
||||
|
||||
docker-restart: docker-stop docker-build docker-run
|
||||
@echo "Worker restarted"
|
||||
Reference in New Issue
Block a user