mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-01 11:19:32 -05:00
couple changes to the consumer.
This commit is contained in:
parent
dac7971cd6
commit
221c1e76e9
@ -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