Avoid loss of log during background processing (#6736)

Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
Marc Bernard 2024-01-07 15:57:12 +01:00 committed by GitHub
parent 2222c883e1
commit 5a7c6e7b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,6 +143,11 @@ CLASS zcl_abapgit_background IMPLEMENTATION.
ii_log = li_log
it_settings = <ls_list>-settings ).
" Decrease memory usage for repository already processed (but keep log)
lo_repo->refresh(
iv_drop_cache = abap_true
iv_drop_log = abap_false ).
" Clear auth buffer to allow different user/password per repository in background mode
zcl_abapgit_login_manager=>clear( ).
@ -150,13 +155,6 @@ CLASS zcl_abapgit_background IMPLEMENTATION.
li_log->add_exception( lx_error ).
ENDTRY.
TRY.
" Decrease memory usage for repositories already processed
lo_repo->refresh( abap_true ).
CATCH zcx_abapgit_exception INTO lx_error.
li_log->add_exception( lx_error ).
ENDTRY.
zcl_abapgit_log_viewer=>write_log( li_log ).
ENDLOOP.