mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 10:56:48 +00:00
ae4c33fa0e
Add `last_changed_by` field on task updates Fix reports support
18 lines
507 B
Python
18 lines
507 B
Python
import logging as log
|
|
|
|
from pymongo.collection import Collection
|
|
from pymongo.database import Database
|
|
from pymongo.errors import OperationFailure
|
|
|
|
|
|
def migrate_backend(db: Database):
|
|
"""
|
|
Drop task text index so that the new one including reports field is created
|
|
"""
|
|
tasks: Collection = db["task"]
|
|
try:
|
|
tasks.drop_index("backend-db.task.main_text_index")
|
|
except OperationFailure as ex:
|
|
log.warning(f"Could not delete task text index due to: {str(ex)}")
|
|
pass
|