Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [FC-0063] Fault tolerance improving #10

Open
wants to merge 14 commits into
base: myhailochernyshov/block-types-processing-refactoring
Choose a base branch
from

Conversation

myhailo-chernyshov-rg
Copy link

@myhailo-chernyshov-rg myhailo-chernyshov-rg commented Feb 13, 2025

Description

There is a problem when the error occurs during conversion, the entire script fails.
This PR solves this problem: when a content processor fails, the error is handled, logged and the next processor starts processing. Also, when all processors cannot generate OLX for a CC resource, it is logged and the next CC resource processing is started.
The statistics about the resources converting success and failure count are collected and logged.
The error logging is improved by using the rich library.
The input converting logging into a file can be configured with the --logs_dir argument usage. It allows to create log file with <input_file_name>.log name inside the specified directory. If the argument is not passed, the log files are not created. The usage example:

cc2olx -i <IMSCC_FILE> --logs_dir <LOGS_DIRECTORY>

Supporting information

FC-0063

Deadline

"None"

@myhailo-chernyshov-rg myhailo-chernyshov-rg self-assigned this Feb 13, 2025
@myhailo-chernyshov-rg myhailo-chernyshov-rg force-pushed the myhailochernyshov/FC-0063/fault-tolerance-improving branch from 277f071 to fba74c4 Compare February 13, 2025 01:52
@myhailo-chernyshov-rg myhailo-chernyshov-rg force-pushed the myhailochernyshov/FC-0063/fault-tolerance-improving branch from fba74c4 to 4e78fcc Compare February 13, 2025 01:59
@myhailo-chernyshov-rg myhailo-chernyshov-rg force-pushed the myhailochernyshov/block-types-processing-refactoring branch from 04d1408 to 1487472 Compare February 24, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants