Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SchoolReportGen
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
霍传世
SchoolReportGen
Commits
4bb0532a
Commit
4bb0532a
authored
Oct 28, 2024
by
霍传世
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
仓库的建立
parent
97807088
Pipeline
#231
canceled with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
depoly.sh
depoly.sh
+26
-0
src/main/java/com/example/pdfgenerator/controller/PDFGeByProvinceBatchController.java
...fgenerator/controller/PDFGeByProvinceBatchController.java
+4
-4
No files found.
depoly.sh
0 → 100644
View file @
4bb0532a
#!/bin/sh
build_dev
(){
git pull
cd
/myworkSpace/PDFGenrate
mvn clean
install
-Dmaven
.test.skip
=
true
cd
/myworkSpace/PDFGenrate
mvn clean package
-Dmaven
.test.skip
=
true
}
run_dev
(){
PID
=
`
ps
-ef
|grep PDFGenerator |grep
-v
"depoly"
|grep
-v
"grep"
|awk
'{print $2}'
`
echo
$PID
echo
"-------stoping--------"
for
pid
in
${
PID
}
do
kill
-9
${
pid
}
echo
"killed
${
pid
}
"
done
echo
"-------starting--------"
nohup
java
-jar
target/PDFGenerator-0.0.1-SNAPSHOT.jar
>
PDFGenerator.log&
tail
-f
PDFGenerator.log
}
build_dev
run_dev
src/main/java/com/example/pdfgenerator/controller/PDFGeByProvinceBatchController.java
View file @
4bb0532a
...
...
@@ -213,10 +213,10 @@ public class PDFGeByProvinceBatchController {
processBuilder
.
command
(
"bash"
,
"-c"
,
schoolLevel
.
getCommand
());
processBuilder
.
redirectErrorStream
(
true
);
// 合并标准输出和错误输出
Process
process
=
processBuilder
.
start
();
//
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
//
String line;
//
while ((line = reader.readLine()) != null) {
//
}
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
process
.
getInputStream
()));
String
line
;
while
((
line
=
reader
.
readLine
())
!=
null
)
{
}
Thread
.
sleep
(
1000
);
int
exitCode
=
process
.
waitFor
();
logger
.
info
(
"exitCode:"
+
schoolLevel
.
getSchool
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment