* finish task #6924.
This commit is contained in:
30
bin/init.bat
30
bin/init.bat
@@ -128,6 +128,33 @@ if %requestType% == 'PATH_INFO' (
|
||||
echo %createcycle% > %baseDir%createcycle.bat
|
||||
echo createcycle.bat ok
|
||||
|
||||
:: init queue.
|
||||
if %requestType% == 'PATH_INFO' (
|
||||
SET initqueue= %phpcli% %baseDir%ztcli "%pmsRoot%/ci-initQueue"
|
||||
)else (
|
||||
SET initqueue= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=ci&f=initQueue"
|
||||
)
|
||||
echo %initqueue% > %baseDir%initqueue.bat
|
||||
echo initqueue.bat ok
|
||||
|
||||
:: check build status.
|
||||
if %requestType% == 'PATH_INFO' (
|
||||
SET checkbuildstatus= %phpcli% %baseDir%ztcli "%pmsRoot%/ci-checkBuildStatus"
|
||||
)else (
|
||||
SET checkbuildstatus= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=ci&f=checkBuildStatus"
|
||||
)
|
||||
echo %checkbuildstatus% > %baseDir%checkbuildstatus.bat
|
||||
echo checkbuildstatus.bat ok
|
||||
|
||||
:: execute compile.
|
||||
if %requestType% == 'PATH_INFO' (
|
||||
SET execcompile= %phpcli% %baseDir%ztcli "%pmsRoot%/ci-exec"
|
||||
)else (
|
||||
SET execcompile= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=ci&f=exec"
|
||||
)
|
||||
echo %execcompile% > %baseDir%execcompile.bat
|
||||
echo execcompile.bat ok
|
||||
|
||||
:: delete log.
|
||||
if %requestType% == 'PATH_INFO' (
|
||||
SET deletelog= %phpcli% %baseDir%ztcli "%pmsRoot%/admin-deleteLog"
|
||||
@@ -155,6 +182,9 @@ echo 1-59/5 * * * * %baseDir%sendmail.bat # async send mail.
|
||||
echo 1-59/5 * * * * %baseDir%sendwebhook.bat # async send webhook. >> %sysCron%
|
||||
echo 1 1 * * * %baseDir%createcycle.bat # create cycle todo. >> %sysCron%
|
||||
echo 30 1 * * * %baseDir%deletelog.bat # delete log. >> %sysCron%
|
||||
echo 1 0 * * * %baseDir%initqueue.bat # init queue. >> %sysCron%
|
||||
echo 1-59/5 * * * * %baseDir%checkbuildstatus.bat # check build status. >> %sysCron%
|
||||
echo 1-59/5 * * * * %baseDir%execcompile.bat # execute compile. >> %sysCron%
|
||||
|
||||
:: return 0 when success.
|
||||
exit /b 0
|
||||
|
||||
30
bin/init.sh
30
bin/init.sh
@@ -131,6 +131,33 @@ fi
|
||||
echo $createcycle > $basePath/createcycle.sh
|
||||
echo "createcycle.sh ok"
|
||||
|
||||
# init queue.
|
||||
if [ $requestType == 'PATH_INFO' ]; then
|
||||
initqueue="$phpcli $basePath/ztcli '$pmsRoot/ci-initQueue'";
|
||||
else
|
||||
initqueue="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=ci&f=initQueue'";
|
||||
fi
|
||||
echo $initqueue > $basePath/initqueue.sh
|
||||
echo "initqueue.sh ok"
|
||||
|
||||
# check build status.
|
||||
if [ $requestType == 'PATH_INFO' ]; then
|
||||
checkbuildstatus="$phpcli $basePath/ztcli '$pmsRoot/ci-checkBuildStatus'";
|
||||
else
|
||||
checkbuildstatus="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=ci&f=checkBuildStatus'";
|
||||
fi
|
||||
echo $checkbuildstatus > $basePath/checkbuildstatus.sh
|
||||
echo "checkbuildstatus.sh ok"
|
||||
|
||||
# execute compile.
|
||||
if [ $requestType == 'PATH_INFO' ]; then
|
||||
execcompile="$phpcli $basePath/ztcli '$pmsRoot/ci-exec'";
|
||||
else
|
||||
execcompile="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=ci&f=exec'";
|
||||
fi
|
||||
echo $execcompile > $basePath/execcompile.sh
|
||||
echo "execcompile.sh ok"
|
||||
|
||||
# delete log.
|
||||
if [ $requestType == 'PATH_INFO' ]; then
|
||||
deletelog="$phpcli $basePath/ztcli '$pmsRoot/admin-deleteLog'";
|
||||
@@ -155,6 +182,9 @@ echo "1-59/5 * * * * $basePath/sendmail.sh # async send mail
|
||||
echo "1-59/5 * * * * $basePath/sendwebhook.sh # async send webhook." >> $basePath/cron/sys.cron
|
||||
echo "1 1 * * * $basePath/createcycle.sh # create cycle todo." >> $basePath/cron/sys.cron
|
||||
echo "30 1 * * * $basePath/deletelog.sh # delete log." >> $basePath/cron/sys.cron
|
||||
echo "1 0 * * * $basePath/initqueue.sh # init queue." >> $basePath/cron/sys.cron
|
||||
echo "1-59/5 * * * * $basePath/checkbuildstatus.sh # check build status." >> $basePath/cron/sys.cron
|
||||
echo "1-59/5 * * * * $basePath/execcompile.sh # execute compile." >> $basePath/cron/sys.cron
|
||||
cron="$phpcli $basePath/php/crond.php"
|
||||
echo $cron > $basePath/cron.sh
|
||||
echo "cron.sh ok"
|
||||
|
||||
Reference in New Issue
Block a user