未验证 提交 eaeeb884 编写于 作者: S Sing_chan 提交者: GitHub

fix bug of clear third_party cache every 10 days (#36332)

上级 fc5415d6
...@@ -138,6 +138,17 @@ if %day_now% NEQ %day_before% ( ...@@ -138,6 +138,17 @@ if %day_now% NEQ %day_before% (
echo %day_now% > %cache_dir%\day.txt echo %day_now% > %cache_dir%\day.txt
type %cache_dir%\day.txt type %cache_dir%\day.txt
rmdir %BUILD_DIR% /s/q rmdir %BUILD_DIR% /s/q
: clear third party cache every once in a while
if %day_now% EQU 21 (
rmdir %cache_dir%\third_party /s/q
)
if %day_now% EQU 11 (
rmdir %cache_dir%\third_party /s/q
)
if %day_now% EQU 01 (
rmdir %cache_dir%\third_party /s/q
)
goto :mkbuild goto :mkbuild
) )
...@@ -333,24 +344,6 @@ rem set CLCACHE_OBJECT_CACHE_TIMEOUT_MS=1000000 ...@@ -333,24 +344,6 @@ rem set CLCACHE_OBJECT_CACHE_TIMEOUT_MS=1000000
rem clcache.exe -M 21474836480 rem clcache.exe -M 21474836480
rem ------set third_party cache dir------ rem ------set third_party cache dir------
: clear third party cache every once in a while
for /F %%# in ('wmic os get localdatetime^|findstr 20') do set datetime=%%#
set day_now=%datetime:~6,2%
set day_before=-1
set /p day_before=< %cache_dir%\day.txt
if %day_now% NEQ %day_before% (
echo %day_now% > %cache_dir%\day.txt
type %cache_dir%\day.txt
if %day_now% EQU 21 (
rmdir %cache_dir%\third_party /s/q
)
if %day_now% EQU 11 (
rmdir %cache_dir%\third_party /s/q
)
if %day_now% EQU 01 (
rmdir %cache_dir%\third_party /s/q
)
)
if "%WITH_TPCACHE%"=="OFF" ( if "%WITH_TPCACHE%"=="OFF" (
set THIRD_PARTY_PATH=%work_dir:\=/%/%BUILD_DIR%/third_party set THIRD_PARTY_PATH=%work_dir:\=/%/%BUILD_DIR%/third_party
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册