run:
	Y_PYTHON_SOURCE_ROOT="/home/$(USER)/arc/arcadia" src/asgi/trip.asgi src.main:app --log-level DEBUG --reload

arq:
	Y_PYTHON_SOURCE_ROOT="/home/$(USER)/arc/arcadia" src/arq/trip.arq src.worker.settings.WorkerSettings

test:
	ya make -tt --test-disable-timeout
	flake8 .

test-pdb:
	ya make -tt --pdb

dbshell:
	Y_PYTHON_ENTRY_POINT="intranet.trip.src.manage:dbshell" src/asgi/trip.asgi $@

shell:
	Y_PYTHON_ENTRY_POINT="IPython:start_ipython" src/asgi/trip.asgi --profile-dir .

VERSION := $(USER)-$(shell date +"%s")
STAGE := tools_trip_$(USER)
stand:
	ya tool releaser build --version $(VERSION)
	ya tool releaser push --version $(VERSION)
	ya tool releaser deploy --version $(VERSION) --stage $(STAGE)

b2b-stand:
	ya tool releaser stand -s tools_trip_b2b_testing

testing:
	ya tool releaser release
	ya tool releaser deploy -e tools_trip_b2b_testing

deploy-migration:
	ya tool releaser deploy -e tools_trip_production -c migration:migration

production:
	ya tool releaser deploy -e tools_trip_production -c api:api,worker:worker,migration:migration,monitoring:monitoring,b2b-robot-api:b2b-robot-api,b2b-monitoring:b2b-monitoring

b2b-production:
	ya tool releaser deploy -e tools_trip_b2b_production
