Skip to content

Commit

Permalink
cached titles update in cli
Browse files Browse the repository at this point in the history
  • Loading branch information
maksii committed May 31, 2024
1 parent 94a0c93 commit f67fe77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion toloka2MediaServer/main_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from toloka2MediaServer.utils.title import Title, config_to_title
from toloka2MediaServer.utils.torrent_processor import add, update

from toloka2MediaServer.config import titles, toloka, application_config
from toloka2MediaServer.config import titles, toloka, application_config, update_titles

client = dynamic_client_init()

Expand Down Expand Up @@ -69,6 +69,8 @@ def update_release_by_name(args, codename, logger, operation_result=None):
operation_result = update_release(args, codename, logger, operation_result)

def update_release(args, codename, logger, operation_result):
#update to be sure, that we always work with latest version of titles
titles = update_titles()
title_from_config = config_to_title(titles, codename)
operation_result = update(client, title_from_config, args.force, operation_result)
client.end_session()
Expand Down

0 comments on commit f67fe77

Please sign in to comment.