Open freddyzinsou opened 1 year ago
if you really need autodiscover you can pass a list of packages like: autodiscover=['package1', 'package2']
this will ignore your django migrations
I forgot to mention this, but have already try it, and it got the same issue
any solutions to this problem? why does is it still scanning everything in INSTALLED_APPS
, even if you specify a list of packages to scan?
it looks like an issue in the discover()
method here.
for fixup in self.fixups:
modules |= set(fixup.autodiscover_modules())
the call to django fixup's autodiscover_modules() returns everything in INSTALLED_APPS
and the logic in discover()
needs to consider that if self.conf.autodiscover
is a List
, then don't union the modules returned from the fixup?
Checklist
master
branch of Faust.Steps to reproduce
I have installed the latest faust-streaming package and conf faust with autodiscovery set to True
And run my worker with python -m worker.app worker -l info. And it get this and I seems that faust try to load some python package files and my migrations in addition to file which should be loaded
Expected behavior
It should load only the faust tagged file, ie files containing agent decorator and others, not my migrations or others packages files
Actual behavior
I'm trying to migrate from faust which is not maintained no more to faust-streaming. I did the configuration properly and when i run my faust worker it seems that the venusian package detect either my django migration files and try to load it. With this my application return some warning followed by non-blocking error for each migration file i have in my project
Full traceback
Versions