浏览代码

集群配置更新

xueli.xue 8 年前
父节点
当前提交
6a8f42a2fb

+ 4 - 3
xxl-job-admin/src/main/resources/quartz.properties 查看文件

@@ -4,22 +4,23 @@
4 4
 #
5 5
 
6 6
 org.quartz.scheduler.instanceName: DefaultQuartzScheduler
7
+org.quartz.scheduler.instanceId: AUTO
7 8
 org.quartz.scheduler.rmi.export: false
8 9
 org.quartz.scheduler.rmi.proxy: false
9 10
 org.quartz.scheduler.wrapJobExecutionInUserTransaction: false
10 11
 
11 12
 org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool
12
-org.quartz.threadPool.threadCount: 10
13
+org.quartz.threadPool.threadCount: 15
13 14
 org.quartz.threadPool.threadPriority: 5
14 15
 org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread: true
15 16
 
16 17
 org.quartz.jobStore.misfireThreshold: 60000
18
+org.quartz.jobStore.maxMisfiresToHandleAtATime: 1
17 19
 
18 20
 #org.quartz.jobStore.class: org.quartz.simpl.RAMJobStore
19 21
 
20 22
 # for cluster
21 23
 org.quartz.jobStore.tablePrefix = XXL_JOB_QRTZ_
22
-org.quartz.scheduler.instanceId: AUTO
23 24
 org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX
24 25
 org.quartz.jobStore.isClustered: true
25
-org.quartz.jobStore.clusterCheckinInterval: 1000
26
+org.quartz.jobStore.clusterCheckinInterval: 5000

+ 3 - 2
xxl-job-admin/src/main/resources/spring/applicationcontext-xxl-job-admin.xml 查看文件

@@ -74,8 +74,9 @@
74 74
 
75 75
 	<bean id="quartzScheduler" lazy-init="false" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
76 76
 		<property name="dataSource" ref="dataSource" />
77
-		<property name="autoStartup" value="true" />	<!--自动启动 -->
78
-		<property name="startupDelay" value="20" />		<!--延时启动 -->
77
+		<property name="autoStartup" value="true" />			<!--自动启动 -->
78
+		<property name="startupDelay" value="20" />				<!--延时启动,应用启动成功后在启动 -->
79
+		<property name="overwriteExistingJobs" value="true" />	<!--覆盖DB中JOB:true、以数据库中已经存在的为准:false -->
79 80
 		<property name="applicationContextSchedulerContextKey"  value="applicationContextKey" />
80 81
 		<property name="configLocation" value="classpath:quartz.properties"/>
81 82
 	</bean>