1

I have project with next structure:

app.py

src

__ check_health.py

__ health_checker.py

venv


health_checker.py

import requests


def health_checker():
    host = 'http://172.22.19.244:49250/api/v1/health'
    response = requests.get(host).json()
    print(response)

check_health.py

from src.health_cheker import health_checker
import dramatiq

@dramatic.actor
def check_health():
    health_checker()

app.py

from src.check_health import check_health


if __name__ == '__main__':
    check_health.send()

When I try to start dramatiq with

dramatiq check_health

dramatiq raise error:

ModuleNotFoundError: No module named 'src'

what I do wrong?

0 Answers0