mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-17 10:13:56 -05:00
couple changes to the consumer.
This commit is contained in:
parent
75390693b9
commit
d5ec762954
@ -95,14 +95,8 @@ class Command(BaseCommand):
|
|||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
directory = options["directory"]
|
directory = options["directory"]
|
||||||
|
|
||||||
logging.getLogger(__name__).info(
|
|
||||||
f"Starting document consumer at {directory}")
|
|
||||||
|
|
||||||
for entry in os.scandir(directory):
|
for entry in os.scandir(directory):
|
||||||
if entry.is_file():
|
_consume(entry.path)
|
||||||
async_task("documents.tasks.consume_file",
|
|
||||||
entry.path,
|
|
||||||
task_name=os.path.basename(entry.path)[:100])
|
|
||||||
|
|
||||||
if options["oneshot"]:
|
if options["oneshot"]:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user