mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
[dev] update front-end page(all date string generate by server)
This commit is contained in:
parent
987c016e24
commit
7a6b8c0a0c
@ -68,7 +68,7 @@ PS:感谢文档翻译平台[breword](https://www.breword.com/)对本项目英
|
|||||||
* [广播执行](https://yq.aliyun.com/articles/716203?spm=a2c4e.11153959.teamhomeleft.40.371960c9qhB1mB):运行清理日志脚本什么的,也太实用了8~
|
* [广播执行](https://yq.aliyun.com/articles/716203?spm=a2c4e.11153959.teamhomeleft.40.371960c9qhB1mB):运行清理日志脚本什么的,也太实用了8~
|
||||||
|
|
||||||
# 其他
|
# 其他
|
||||||
* 产品永久开源(Apache License, Version 2.0),免费使用,且目前开发者@KFCFans有充足的时间进行项目维护和提供无偿技术支持(All In 了解一下),欢迎各位试用!
|
* 开源许可证:Apache License, Version 2.0
|
||||||
* 欢迎共同参与本项目的贡献,PR和Issue都大大滴欢迎(求求了)~
|
* 欢迎共同参与本项目的贡献,PR和Issue都大大滴欢迎(求求了)~
|
||||||
* 觉得还不错的话,可以点个Star支持一下哦~ = ̄ω ̄=
|
* 觉得还不错的话,可以点个Star支持一下哦~ = ̄ω ̄=
|
||||||
* 联系方式@KFCFans -> `tengjiqi@gmail.com`
|
* 联系方式@KFCFans -> `tengjiqi@gmail.com`
|
||||||
|
@ -7,7 +7,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
/**
|
/**
|
||||||
* 处理 server 异常信息的 actor
|
* 处理 server 异常信息的 actor
|
||||||
*
|
*
|
||||||
* @author 朱八
|
* @author tjq
|
||||||
* @since 2020/7/18
|
* @since 2020/7/18
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@ -64,7 +64,7 @@ public interface InstanceInfoRepository extends JpaRepository<InstanceInfoDO, Lo
|
|||||||
long countByAppIdAndStatus(long appId, int status);
|
long countByAppIdAndStatus(long appId, int status);
|
||||||
long countByAppIdAndStatusAndGmtCreateAfter(long appId, int status, Date time);
|
long countByAppIdAndStatusAndGmtCreateAfter(long appId, int status, Date time);
|
||||||
|
|
||||||
@Query(value = "select jobId from InstanceInfoDO where jobId in ?1 and status in ?2")
|
@Query(value = "select distinct jobId from InstanceInfoDO where jobId in ?1 and status in ?2")
|
||||||
List<Long> findByJobIdInAndStatusIn(List<Long> jobIds, List<Integer> status);
|
List<Long> findByJobIdInAndStatusIn(List<Long> jobIds, List<Integer> status);
|
||||||
|
|
||||||
// 删除历史数据,JPA自带的删除居然是根据ID循环删,2000条数据删了几秒,也太拉垮了吧...
|
// 删除历史数据,JPA自带的删除居然是根据ID循环删,2000条数据删了几秒,也太拉垮了吧...
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -9,6 +9,7 @@ import com.github.kfcfans.powerjob.server.persistence.core.model.OmsLockDO;
|
|||||||
import com.github.kfcfans.powerjob.server.persistence.core.repository.InstanceInfoRepository;
|
import com.github.kfcfans.powerjob.server.persistence.core.repository.InstanceInfoRepository;
|
||||||
import com.github.kfcfans.powerjob.server.persistence.core.repository.JobInfoRepository;
|
import com.github.kfcfans.powerjob.server.persistence.core.repository.JobInfoRepository;
|
||||||
import com.github.kfcfans.powerjob.server.persistence.core.repository.OmsLockRepository;
|
import com.github.kfcfans.powerjob.server.persistence.core.repository.OmsLockRepository;
|
||||||
|
import com.github.kfcfans.powerjob.server.persistence.core.repository.WorkflowInstanceInfoRepository;
|
||||||
import org.assertj.core.util.Lists;
|
import org.assertj.core.util.Lists;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
@ -37,6 +38,8 @@ public class RepositoryTest {
|
|||||||
private OmsLockRepository omsLockRepository;
|
private OmsLockRepository omsLockRepository;
|
||||||
@Resource
|
@Resource
|
||||||
private InstanceInfoRepository instanceInfoRepository;
|
private InstanceInfoRepository instanceInfoRepository;
|
||||||
|
@Resource
|
||||||
|
private WorkflowInstanceInfoRepository workflowInstanceInfoRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需要证明批量写入失败后会回滚
|
* 需要证明批量写入失败后会回滚
|
||||||
@ -54,6 +57,14 @@ public class RepositoryTest {
|
|||||||
omsLockRepository.flush();
|
omsLockRepository.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDeleteLock() {
|
||||||
|
String lockName = "test-lock";
|
||||||
|
OmsLockDO lockDO = new OmsLockDO(lockName, NetUtils.getLocalHost(), 10000L);
|
||||||
|
omsLockRepository.save(lockDO);
|
||||||
|
omsLockRepository.deleteByLockName(lockName);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSelectCronJobSQL() {
|
public void testSelectCronJobSQL() {
|
||||||
List<JobInfoDO> result = jobInfoRepository.findByAppIdInAndStatusAndTimeExpressionTypeAndNextTriggerTimeLessThanEqual(Lists.newArrayList(1L), SwitchableStatus.ENABLE.getV(), TimeExpressionType.CRON.getV(), System.currentTimeMillis());
|
List<JobInfoDO> result = jobInfoRepository.findByAppIdInAndStatusAndTimeExpressionTypeAndNextTriggerTimeLessThanEqual(Lists.newArrayList(1L), SwitchableStatus.ENABLE.getV(), TimeExpressionType.CRON.getV(), System.currentTimeMillis());
|
||||||
@ -85,4 +96,20 @@ public class RepositoryTest {
|
|||||||
System.out.println(res);
|
System.out.println(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testFindByJobIdInAndStatusIn() {
|
||||||
|
List<Long> res = instanceInfoRepository.findByJobIdInAndStatusIn(Lists.newArrayList(1L, 2L, 3L, 4L), Lists.newArrayList(1, 2, 3, 4, 5));
|
||||||
|
System.out.println(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDeleteInstanceInfo() {
|
||||||
|
instanceInfoRepository.deleteAllByGmtModifiedBefore(new Date());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDeleteWorkflowInstanceInfo() {
|
||||||
|
workflowInstanceInfoRepository.deleteAllByGmtModifiedBefore(new Date());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
server.port=8082
|
server.port=8081
|
||||||
|
|
||||||
spring.jpa.open-in-view=false
|
spring.jpa.open-in-view=false
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user