|
@@ -12,10 +12,18 @@ public class CGetTask implements ITask {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
// TODO Auto-generated method stub
|
|
|
- Record studyidfind = Db.use("local").findFirst("select * from study where status =1 order by createAt asc");
|
|
|
+ Record studyidfind = Db.use("local").findFirst("select * from study where status =1 or status =4 order by createAt asc");
|
|
|
+ if (studyidfind == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
studyidfind.set("status", 2);
|
|
|
Db.use("local").update("study", studyidfind);
|
|
|
String execCmd = ExecUtil.execCmd("/zskk_system/other/cget.sh " + studyidfind.getStr("studyuid"));
|
|
|
+ if (execCmd.contains("Connection refused")) {
|
|
|
+ studyidfind.set("status", 4);
|
|
|
+ Db.use("local").update("study", studyidfind);
|
|
|
+ return;
|
|
|
+ }
|
|
|
studyidfind.set("status", 3);
|
|
|
Db.use("local").update("study", studyidfind);
|
|
|
}
|