File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 2525from monitoring .utils import RawFilesPayload
2626from processing .config import Config
2727from processing .metadata_api import MetadataApi
28- from processing .storage_api import StorageApi
28+ from processing .storage_api import StorageApi , StorageApiError
2929from processing .utils import make_session
3030
3131T = TypeVar ("T" , bound = PeriodProtocol )
3535def main () -> None :
3636 api_client , md_api , storage_api = build_clients ()
3737
38- logging .basicConfig (level = logging .INFO , format = "%(levelname)s: %(message)s" )
38+ logging .basicConfig (
39+ level = logging .INFO , format = "Monitoring:%(levelname)s: %(message)s"
40+ )
3941 args = _get_args ()
4042 period_cls = period_cls_from_str (args .cmd )
4143 periods = build_periods (period_cls , args )
@@ -65,8 +67,10 @@ def main() -> None:
6567 md_api ,
6668 )
6769 )
68- except ValueError as err :
69- logging .warning (err )
70+ except (ValueError , StorageApiError ) as err :
71+ logging .warning (f"{ period !r} { product } { site } : { err } " )
72+ except StorageApiError as err :
73+ logging .error (f"{ period !r} { product } { site } : { err } " )
7074
7175
7276def build_clients () -> tuple [APIClient , MetadataApi , StorageApi ]:
You can’t perform that action at this time.
0 commit comments