Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
atomicwrites >= 1.3.0
beanie~=1.7
beanie>=2.0.1
click >=7
cryptography < 43.0.0
Deprecated == 1.2.0
Expand Down Expand Up @@ -28,6 +28,7 @@ paramiko
pika>=1.2.0
Pillow >= 7.2.0
pydantic >= 2.0.0
pymongo >= 4.15.5
python-magic
python-multipart
pyyaml
Expand Down
5 changes: 2 additions & 3 deletions src/ocrd_network/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
"""
from beanie import init_beanie
from beanie.operators import In
from motor.motor_asyncio import AsyncIOMotorClient
from pathlib import Path
from pymongo import MongoClient, uri_parser as mongo_uri_parser
from pymongo import AsyncMongoClient, MongoClient, uri_parser as mongo_uri_parser
from re import sub as re_sub
from typing import List
from uuid import uuid4
Expand All @@ -26,7 +25,7 @@


async def initiate_database(db_url: str, db_name: str = 'ocrd'):
client = AsyncIOMotorClient(db_url)
client = AsyncMongoClient(db_url)
await init_beanie(
database=client.get_default_database(default=db_name),
document_models=[DBProcessorJob, DBWorkflowJob, DBWorkspace, DBWorkflowScript]
Expand Down
Loading