Skip to content

Commit 12cb672

Browse files
committed
Added new file for task config
1 parent 059c254 commit 12cb672

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright 2013 The MITRE Corporation
4+
and the MIT Kerberos and Internet Trust Consortium
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<beans xmlns="http://www.springframework.org/schema/beans"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xmlns:task="http://www.springframework.org/schema/task"
21+
xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd
22+
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
23+
24+
<!-- Configuration for scheduled tasks -->
25+
<task:scheduler id="taskScheduler" pool-size="10" />
26+
<task:executor id="taskExecutor" pool-size="5" />
27+
<task:annotation-driven scheduler="taskScheduler" executor="taskExecutor" />
28+
29+
<!-- Schedule the token service and approved site service to clear out expired tokens and sites every 5 minutes -->
30+
<task:scheduled-tasks scheduler="taskScheduler">
31+
<task:scheduled ref="defaultOAuth2ProviderTokenService" method="clearExpiredTokens" fixed-rate="300000"/>
32+
<task:scheduled ref="defaultApprovedSiteService" method="clearExpiredSites" fixed-rate="300000"/>
33+
</task:scheduled-tasks>
34+
35+
</beans>

0 commit comments

Comments
 (0)