|
@@ -17,13 +17,13 @@ public class CMoveTask implements ITask {
|
|
@Override
|
|
@Override
|
|
public void run() {
|
|
public void run() {
|
|
// TODO Auto-generated method stub
|
|
// TODO Auto-generated method stub
|
|
- Integer max = 5;
|
|
|
|
- List<Record> count = Db.use("local").find("select * from study where status =4");
|
|
|
|
|
|
+ Integer max = 10;
|
|
|
|
+// List<Record> count = Db.use("local").find("select * from study where status =4");
|
|
//同时下载的队列
|
|
//同时下载的队列
|
|
- Integer flag = count.size();
|
|
|
|
- if (flag >= max) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
+// Integer flag = count.size();
|
|
|
|
+// if (flag >= max) {
|
|
|
|
+// return;
|
|
|
|
+// }
|
|
List<Record> studyidfinds = Db.use("local").find("select * from study where status =1 or status =2 order by createAt asc limit 6");
|
|
List<Record> studyidfinds = Db.use("local").find("select * from study where status =1 or status =2 order by createAt asc limit 6");
|
|
if (studyidfinds == null) {
|
|
if (studyidfinds == null) {
|
|
return;
|
|
return;
|
|
@@ -42,10 +42,10 @@ public class CMoveTask implements ITask {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- flag++;
|
|
|
|
- if (flag > max) {
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
|
|
+// flag++;
|
|
|
|
+// if (flag > max) {
|
|
|
|
+// break;
|
|
|
|
+// }
|
|
//状态4:下载中
|
|
//状态4:下载中
|
|
studyidfind.set("status", 4);
|
|
studyidfind.set("status", 4);
|
|
Db.use("local").update("study", studyidfind);
|
|
Db.use("local").update("study", studyidfind);
|