Refresh repository to reduce memory usage in background mode (#6728)

This commit is contained in:
ConjuringCoffee 2024-01-04 08:04:31 +01:00 committed by GitHub
parent 60cf845079
commit d9eee6ef3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,7 +114,7 @@ CLASS zcl_abapgit_background IMPLEMENTATION.
TRY.
enqueue( ).
CATCH zcx_abapgit_exception.
WRITE: / 'Another intance of the program is already running'.
WRITE: / 'Another instance of the program is already running'.
RETURN.
ENDTRY.
@ -150,6 +150,13 @@ 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.