mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 08:15:27 +01:00
couple changes to the consumer.
This commit is contained in:
parent
75390693b9
commit
d5ec762954
1 changed files with 1 additions and 7 deletions
|
|
@ -95,14 +95,8 @@ class Command(BaseCommand):
|
|||
def handle(self, *args, **options):
|
||||
directory = options["directory"]
|
||||
|
||||
logging.getLogger(__name__).info(
|
||||
f"Starting document consumer at {directory}")
|
||||
|
||||
for entry in os.scandir(directory):
|
||||
if entry.is_file():
|
||||
async_task("documents.tasks.consume_file",
|
||||
entry.path,
|
||||
task_name=os.path.basename(entry.path)[:100])
|
||||
_consume(entry.path)
|
||||
|
||||
if options["oneshot"]:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue