Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
7f903e9c
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7f903e9c
编写于
8月 20, 2020
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix queue start
上级
6fc57d81
变更
32
隐藏空白更改
内联
并排
Showing
32 changed file
with
272 addition
and
200 deletion
+272
-200
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/ThisApplication.java
...va/com/x/attendance/assemble/control/ThisApplication.java
+27
-58
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/ThisApplication.java
...main/java/com/x/bbs/assemble/control/ThisApplication.java
+9
-7
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/ThisApplication.java
...java/com/x/calendar/assemble/control/ThisApplication.java
+13
-7
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/ThisApplication.java
...main/java/com/x/cms/assemble/control/ThisApplication.java
+19
-28
o2server/x_file_assemble_control/src/main/java/com/x/file/assemble/control/ThisApplication.java
...ain/java/com/x/file/assemble/control/ThisApplication.java
+5
-2
o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/ThisApplication.java
.../java/com/x/general/assemble/control/ThisApplication.java
+4
-0
o2server/x_hotpic_assemble_control/src/main/java/com/x/hotpic/assemble/control/ThisApplication.java
...n/java/com/x/hotpic/assemble/control/ThisApplication.java
+5
-2
o2server/x_jpush_assemble_control/src/main/java/com/x/jpush/assemble/control/ThisApplication.java
...in/java/com/x/jpush/assemble/control/ThisApplication.java
+4
-0
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/ThisApplication.java
.../java/com/x/meeting/assemble/control/ThisApplication.java
+4
-0
o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/ThisApplication.java
...a/com/x/message/assemble/communicate/ThisApplication.java
+51
-53
o2server/x_mind_assemble_control/src/main/java/com/x/mind/assemble/control/ThisApplication.java
...ain/java/com/x/mind/assemble/control/ThisApplication.java
+6
-2
o2server/x_mind_assemble_control/src/main/webapp/describe/sources/com/x/mind/assemble/control/ThisApplication.java
.../sources/com/x/mind/assemble/control/ThisApplication.java
+7
-2
o2server/x_okr_assemble_control/src/main/java/com/x/okr/assemble/control/ThisApplication.java
...main/java/com/x/okr/assemble/control/ThisApplication.java
+5
-4
o2server/x_okr_assemble_control/src/main/webapp/describe/sources/com/x/okr/assemble/control/ThisApplication.java
...e/sources/com/x/okr/assemble/control/ThisApplication.java
+6
-4
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/ThisApplication.java
...organization/assemble/authentication/ThisApplication.java
+5
-2
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/ThisApplication.java
.../com/x/organization/assemble/control/ThisApplication.java
+4
-0
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/ThisApplication.java
.../com/x/organization/assemble/express/ThisApplication.java
+4
-0
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/ThisApplication.java
...com/x/organization/assemble/personal/ThisApplication.java
+4
-0
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/ThisApplication.java
.../java/com/x/portal/assemble/designer/ThisApplication.java
+4
-0
o2server/x_portal_assemble_surface/src/main/java/com/x/portal/assemble/surface/ThisApplication.java
...n/java/com/x/portal/assemble/surface/ThisApplication.java
+4
-0
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/ThisApplication.java
...ources/com/x/portal/assemble/surface/ThisApplication.java
+5
-0
o2server/x_processplatform_assemble_bam/src/main/java/com/x/processplatform/assemble/bam/ThisApplication.java
...a/com/x/processplatform/assemble/bam/ThisApplication.java
+4
-0
o2server/x_processplatform_assemble_bam/src/main/webapp/describe/sources/com/x/processplatform/assemble/bam/ThisApplication.java
...s/com/x/processplatform/assemble/bam/ThisApplication.java
+5
-0
o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/ThisApplication.java
.../x/processplatform/assemble/designer/ThisApplication.java
+14
-15
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/ThisApplication.java
...m/x/processplatform/assemble/surface/ThisApplication.java
+4
-0
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ThisApplication.java
...x/processplatform/service/processing/ThisApplication.java
+7
-3
o2server/x_program_center/src/main/java/com/x/program/center/ThisApplication.java
...r/src/main/java/com/x/program/center/ThisApplication.java
+16
-10
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/ThisApplication.java
...n/java/com/x/query/assemble/designer/ThisApplication.java
+4
-0
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/ThisApplication.java
...in/java/com/x/query/assemble/surface/ThisApplication.java
+4
-0
o2server/x_query_service_processing/src/main/java/com/x/query/service/processing/ThisApplication.java
.../java/com/x/query/service/processing/ThisApplication.java
+4
-0
o2server/x_query_service_processing/src/main/webapp/describe/sources/com/x/query/service/processing/ThisApplication.java
...urces/com/x/query/service/processing/ThisApplication.java
+4
-0
o2server/x_query_service_processing/src/main/webapp/describe/sources/com/x/query/service/processing/jaxrs/test/ActionGroup2.java
...m/x/query/service/processing/jaxrs/test/ActionGroup2.java
+11
-1
未找到文件。
o2server/x_attendance_assemble_control/src/main/java/com/x/attendance/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
package
com.x.attendance.assemble.control
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.attendance.assemble.control.processor.monitor.MonitorFileDataOpt
;
import
com.x.attendance.assemble.control.processor.thread.DataProcessThreadFactory
;
import
com.x.attendance.assemble.control.schedule.*
;
import
com.x.attendance.assemble.control.schedule.AttendanceStatisticTask
;
import
com.x.attendance.assemble.control.schedule.DetailLastDayRecordAnalyseTask
;
import
com.x.attendance.assemble.control.schedule.DingdingAttendanceSyncScheduleTask
;
import
com.x.attendance.assemble.control.schedule.MobileRecordAnalyseTask
;
import
com.x.attendance.assemble.control.schedule.QywxAttendanceSyncScheduleTask
;
import
com.x.attendance.assemble.control.service.AttendanceSettingService
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
org.apache.commons.lang3.BooleanUtils
;
public
class
ThisApplication
{
private
ThisApplication
()
{
//nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
return
context
;
}
public
static
QueueDingdingAttendance
dingdingQueue
=
new
QueueDingdingAttendance
();
public
static
QueueQywxAttendanceSync
qywxQueue
=
new
QueueQywxAttendanceSync
();
public
static
QueueQywxUnitStatistic
unitQywxStatisticQueue
=
new
QueueQywxUnitStatistic
();
public
static
QueueQywxPersonStatistic
personQywxStatisticQueue
=
new
QueueQywxPersonStatistic
();
public
static
QueueDingdingPersonStatistic
personStatisticQueue
=
new
QueueDingdingPersonStatistic
();
public
static
QueueDingdingUnitStatistic
unitStatisticQueue
=
new
QueueDingdingUnitStatistic
();
public
static
final
QueueDingdingAttendance
dingdingQueue
=
new
QueueDingdingAttendance
();
public
static
final
QueueQywxAttendanceSync
qywxQueue
=
new
QueueQywxAttendanceSync
();
public
static
final
QueueQywxUnitStatistic
unitQywxStatisticQueue
=
new
QueueQywxUnitStatistic
();
public
static
final
QueueQywxPersonStatistic
personQywxStatisticQueue
=
new
QueueQywxPersonStatistic
();
public
static
final
QueueDingdingPersonStatistic
personStatisticQueue
=
new
QueueDingdingPersonStatistic
();
public
static
final
QueueDingdingUnitStatistic
unitStatisticQueue
=
new
QueueDingdingUnitStatistic
();
public
static
QueuePersonAttendanceDetailAnalyse
detailAnalyseQueue
=
new
QueuePersonAttendanceDetailAnalyse
();
public
static
QueueAttendanceDetailStatistic
detailStatisticQueue
=
new
QueueAttendanceDetailStatistic
();
public
static
final
QueuePersonAttendanceDetailAnalyse
detailAnalyseQueue
=
new
QueuePersonAttendanceDetailAnalyse
();
public
static
final
QueueAttendanceDetailStatistic
detailStatisticQueue
=
new
QueueAttendanceDetailStatistic
();
public
static
void
init
()
throws
Exception
{
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_attendance_assemble_control
());
new
AttendanceSettingService
().
initAllSystemConfig
();
detailAnalyseQueue
.
start
();
detailStatisticQueue
.
start
();
context
.
startQueue
(
detailAnalyseQueue
);
context
.
startQueue
(
detailStatisticQueue
);
if
(
BooleanUtils
.
isTrue
(
Config
.
dingding
().
getAttendanceSyncEnable
()))
{
dingdingQueue
.
start
(
);
personStatisticQueue
.
start
(
);
unitStatisticQueue
.
start
(
);
context
.
startQueue
(
dingdingQueue
);
context
.
startQueue
(
personStatisticQueue
);
context
.
startQueue
(
unitStatisticQueue
);
context
.
schedule
(
DingdingAttendanceSyncScheduleTask
.
class
,
"0 0 1 * * ?"
);
// 已经将任务 放到了同步结束后执行 暂时不需要开定时任务了
// context.schedule(DingdingAttendanceStatisticScheduleTask.class, "0 0 3 * * ?");
// context.schedule(DingdingAttendanceStatisticPersonScheduleTask.class, "0 0 3 * * ?");
}
if
(
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getAttendanceSyncEnable
()))
{
qywxQueue
.
start
(
);
unitQywxStatisticQueue
.
start
(
);
personQywxStatisticQueue
.
start
(
);
context
.
startQueue
(
qywxQueue
);
context
.
startQueue
(
unitQywxStatisticQueue
);
context
.
startQueue
(
personQywxStatisticQueue
);
context
.
schedule
(
QywxAttendanceSyncScheduleTask
.
class
,
"0 0 1 * * ?"
);
}
context
.
schedule
(
AttendanceStatisticTask
.
class
,
"0 0 0/4 * * ?"
);
context
.
schedule
(
MobileRecordAnalyseTask
.
class
,
"0 0 * * * ?"
);
// 每天凌晨1点,计算前一天所有的未签退和未分析的打卡数据
context
.
schedule
(
DetailLastDayRecordAnalyseTask
.
class
,
"0 0 1 * * ?"
);
...
...
@@ -68,43 +71,9 @@ public class ThisApplication {
try
{
CacheManager
.
shutdown
();
DataProcessThreadFactory
.
getInstance
().
showdown
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
MonitorFileDataOpt
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
dingdingQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
personStatisticQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
unitStatisticQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
qywxQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
unitQywxStatisticQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
try
{
personQywxStatisticQueue
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
\ No newline at end of file
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -2,6 +2,8 @@ package com.x.bbs.assemble.control;
import
java.util.List
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.config.Config
;
...
...
@@ -26,10 +28,14 @@ import com.x.bbs.entity.BBSSectionInfo;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
final
String
BBSMANAGER
=
"BBSManager@CMSManagerSystemRole@R"
;
public
static
QueueNewReplyNotify
queueNewReplyNotify
;
public
static
QueueNewSubjectNotify
queueNewSubjectNotify
;
public
static
final
QueueNewReplyNotify
queueNewReplyNotify
=
new
QueueNewReplyNotify
()
;
public
static
final
QueueNewSubjectNotify
queueNewSubjectNotify
=
new
QueueNewSubjectNotify
()
;
public
static
String
CONFIG_BBS_ANONYMOUS_PERMISSION
=
"YES"
;
public
static
Context
context
()
{
...
...
@@ -43,11 +49,7 @@ public class ThisApplication {
CONFIG_BBS_ANONYMOUS_PERMISSION
=
(
new
BBSConfigSettingService
())
.
getValueWithConfigCode
(
"BBS_ANONYMOUS_PERMISSION"
);
initAllSystemConfig
();
queueNewReplyNotify
=
new
QueueNewReplyNotify
();
queueNewSubjectNotify
=
new
QueueNewSubjectNotify
();
MessageConnector
.
start
(
context
());
context
().
startQueue
(
queueNewReplyNotify
);
context
().
startQueue
(
queueNewSubjectNotify
);
context
.
schedule
(
SubjectTotalStatisticTask
.
class
,
"0 0 1 * * ?"
);
// 每天凌晨一点执行
...
...
@@ -144,7 +146,7 @@ public class ThisApplication {
* @return
*/
public
static
Boolean
isForumManager
(
EffectivePerson
effectivePerson
,
BBSForumInfo
forumInfo
)
{
if
(
isBBSManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isBBSManager
(
effectivePerson
)
))
{
return
true
;
}
if
(
forumInfo
!=
null
&&
ListTools
.
isNotEmpty
(
forumInfo
.
getForumManagerList
()))
{
...
...
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -2,6 +2,8 @@ package com.x.calendar.assemble.control;
import
java.util.List
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.config.Config
;
...
...
@@ -17,6 +19,10 @@ import com.x.calendar.core.entity.Calendar_Event;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
final
String
CalendarMANAGER
=
"CalendarManager"
;
...
...
@@ -73,7 +79,7 @@ public class ThisApplication {
* @return
*/
public
static
Boolean
isCalendarManager
(
EffectivePerson
effectivePerson
,
Calendar
calendar
)
{
if
(
isCalendarSystemManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarSystemManager
(
effectivePerson
)
))
{
return
true
;
}
if
(
calendar
!=
null
)
{
...
...
@@ -98,11 +104,11 @@ public class ThisApplication {
*/
public
static
Boolean
isCalendarPublisher
(
EffectivePerson
effectivePerson
,
List
<
String
>
unitNames
,
List
<
String
>
groupNames
,
Calendar
calendar
)
{
if
(
isCalendarSystemManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarSystemManager
(
effectivePerson
)
))
{
return
true
;
}
if
(
calendar
!=
null
)
{
if
(
isCalendarManager
(
effectivePerson
,
calendar
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarManager
(
effectivePerson
,
calendar
)
))
{
return
true
;
}
// 判断发布权限
...
...
@@ -142,13 +148,13 @@ public class ThisApplication {
* @throws Exception
*/
public
static
Boolean
isCalendarPublisher
(
EffectivePerson
effectivePerson
,
Calendar
calendar
)
throws
Exception
{
if
(
isCalendarSystemManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarSystemManager
(
effectivePerson
)
))
{
return
true
;
}
List
<
String
>
unitNames
=
null
;
List
<
String
>
groupNames
=
null
;
if
(
calendar
!=
null
)
{
if
(
isCalendarManager
(
effectivePerson
,
calendar
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarManager
(
effectivePerson
,
calendar
)
))
{
return
true
;
}
UserManagerService
userManagerService
=
new
UserManagerService
();
...
...
@@ -192,7 +198,7 @@ public class ThisApplication {
*/
public
static
Boolean
isEventManager
(
EffectivePerson
effectivePerson
,
Calendar
calendar
,
Calendar_Event
event
)
throws
Exception
{
if
(
isCalendarSystemManager
(
effectivePerson
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarSystemManager
(
effectivePerson
)
))
{
return
true
;
}
List
<
String
>
unitNames
=
null
;
...
...
@@ -203,7 +209,7 @@ public class ThisApplication {
unitNames
=
userManagerService
.
listUnitNamesWithPerson
(
personName
);
groupNames
=
userManagerService
.
listGroupNamesByPerson
(
personName
);
// 判断日历的发布权限
if
(
isCalendarPublisher
(
effectivePerson
,
unitNames
,
groupNames
,
calendar
))
{
if
(
BooleanUtils
.
isTrue
(
isCalendarPublisher
(
effectivePerson
,
unitNames
,
groupNames
,
calendar
)
))
{
return
true
;
}
// 判断事件的管理权限
...
...
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
package
com.x.cms.assemble.control
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
...
...
@@ -22,17 +23,27 @@ import com.x.cms.assemble.control.timertask.Timertask_RefreshAllDocumentReviews;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
final
String
ROLE_CMSManager
=
"CMSManager@CMSManagerSystemRole@R"
;
public
static
final
String
ROLE_Manager
=
"Manager@ManagerSystemRole@R"
;
public
static
QueueDataRowImport
queueDataRowImport
;
public
static
QueueDocumentDelete
queueDocumentDelete
;
public
static
QueueDocumentUpdate
queueDocumentUpdate
;
public
static
QueueDocumentViewCountUpdate
queueDocumentViewCountUpdate
;
public
static
QueueBatchOperation
queueBatchOperation
;
public
static
QueueSendDocumentNotify
queueSendDocumentNotify
;
private
static
ConcurrentHashMap
<
String
,
DataImportStatus
>
importStatus
=
new
ConcurrentHashMap
<>();
// 文档批量导入时数据存储过程
public
static
final
QueueDataRowImport
queueDataRowImport
=
new
QueueDataRowImport
();
// Document删除时也需要检查一下热点图片里的数据是否已经删除掉了
public
static
final
QueueDocumentDelete
queueDocumentDelete
=
new
QueueDocumentDelete
();
// Document变更标题时也需要更新一下热点图片里的数据
public
static
final
QueueDocumentUpdate
queueDocumentUpdate
=
new
QueueDocumentUpdate
();
// Document被访问时,需要将总的访问量更新到item的document中,便于视图使用,在队列里异步修改
public
static
final
QueueDocumentViewCountUpdate
queueDocumentViewCountUpdate
=
new
QueueDocumentViewCountUpdate
();
// 执行数据库中的批处理操作
public
static
final
QueueBatchOperation
queueBatchOperation
=
new
QueueBatchOperation
();
// Document发布时,向所有阅读者推送通知
public
static
final
QueueSendDocumentNotify
queueSendDocumentNotify
=
new
QueueSendDocumentNotify
();
private
static
final
ConcurrentHashMap
<
String
,
DataImportStatus
>
importStatus
=
new
ConcurrentHashMap
<>();
public
static
Context
context
()
{
return
context
;
...
...
@@ -41,21 +52,7 @@ public class ThisApplication {
public
static
void
init
()
throws
Exception
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_cms_assemble_control
());
// 执行数据库中的批处理操作
queueBatchOperation
=
new
QueueBatchOperation
();
// Document删除时也需要检查一下热点图片里的数据是否已经删除掉了
queueDocumentDelete
=
new
QueueDocumentDelete
();
// 文档批量导入时数据存储过程
queueDataRowImport
=
new
QueueDataRowImport
();
// Document变更标题时也需要更新一下热点图片里的数据
queueDocumentUpdate
=
new
QueueDocumentUpdate
();
// Document被访问时,需要将总的访问量更新到item的document中,便于视图使用,在队列里异步修改
queueDocumentViewCountUpdate
=
new
QueueDocumentViewCountUpdate
();
// Document发布时,向所有阅读者推送通知
queueSendDocumentNotify
=
new
QueueSendDocumentNotify
();
MessageConnector
.
start
(
context
());
context
().
startQueue
(
queueBatchOperation
);
context
().
startQueue
(
queueDocumentDelete
);
context
().
startQueue
(
queueDataRowImport
);
...
...
@@ -77,18 +74,12 @@ public class ThisApplication {
public
static
void
destroy
()
{
try
{
CacheManager
.
shutdown
();
queueBatchOperation
.
stop
();
queueDocumentDelete
.
stop
();
queueDataRowImport
.
stop
();
queueDocumentUpdate
.
stop
();
queueDocumentViewCountUpdate
.
stop
();
queueSendDocumentNotify
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
public
static
Concurrent
Hash
Map
<
String
,
DataImportStatus
>
listImportStatus
()
{
public
static
ConcurrentMap
<
String
,
DataImportStatus
>
listImportStatus
()
{
return
importStatus
;
}
...
...
o2server/x_file_assemble_control/src/main/java/com/x/file/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -9,7 +9,11 @@ import com.x.file.assemble.control.jaxrs.file.FileRemoveQueue;
public
class
ThisApplication
{
public
static
FileRemoveQueue
fileRemoveQueue
;
private
ThisApplication
()
{
// nothing
}
public
static
final
FileRemoveQueue
fileRemoveQueue
=
new
FileRemoveQueue
();
protected
static
Context
context
;
...
...
@@ -21,7 +25,6 @@ public class ThisApplication {
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_file_assemble_control
());
fileRemoveQueue
=
new
FileRemoveQueue
();
MessageConnector
.
start
(
context
());
context
().
startQueue
(
fileRemoveQueue
);
}
catch
(
Exception
e
)
{
...
...
o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_hotpic_assemble_control/src/main/java/com/x/hotpic/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -9,7 +9,11 @@ import com.x.hotpic.assemble.control.schedule.InfoExistsCheckTask;
public
class
ThisApplication
{
public
static
DocumentExistsCheckTask
queueLoginRecord
;
private
ThisApplication
()
{
// nothing
}
public
static
final
DocumentExistsCheckTask
queueLoginRecord
=
new
DocumentExistsCheckTask
();
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
@@ -20,7 +24,6 @@ public class ThisApplication {
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_hotpic_assemble_control
());
queueLoginRecord
=
new
DocumentExistsCheckTask
();
context
.
startQueue
(
queueLoginRecord
);
context
.
schedule
(
InfoExistsCheckTask
.
class
,
"0 0/10 * * * ?"
);
}
catch
(
Exception
e
)
{
...
...
o2server/x_jpush_assemble_control/src/main/java/com/x/jpush/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_meeting_assemble_control/src/main/java/com/x/meeting/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -8,6 +8,10 @@ import com.x.base.core.project.message.MessageConnector;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_message_assemble_communicate/src/main/java/com/x/message/assemble/communicate/ThisApplication.java
浏览文件 @
7f903e9c
package
com.x.message.assemble.communicate
;
import
com.x.base.core.project.message.MessageConnector
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.x.base.core.project.Context
;
import
com.x.base.core.project.cache.CacheManager
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.logger.LoggerFactory
;
import
com.x.base.core.project.message.MessageConnector
;
import
com.x.message.assemble.communicate.schedule.Clean
;
import
com.x.message.assemble.communicate.schedule.TriggerMq
;
import
com.x.message.core.entity.Message
;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
WsConsumeQueue
wsConsumeQueue
=
new
WsConsumeQueue
();
public
static
final
WsConsumeQueue
wsConsumeQueue
=
new
WsConsumeQueue
();
public
static
PmsConsumeQueue
pmsConsumeQueue
=
new
PmsConsumeQueue
();
public
static
final
PmsConsumeQueue
pmsConsumeQueue
=
new
PmsConsumeQueue
();
public
static
CalendarConsumeQueue
calendarConsumeQueue
=
new
CalendarConsumeQueue
();
public
static
final
CalendarConsumeQueue
calendarConsumeQueue
=
new
CalendarConsumeQueue
();
public
static
QiyeweixinConsumeQueue
qiyeweixinConsumeQueue
=
new
QiyeweixinConsumeQueue
();
public
static
final
QiyeweixinConsumeQueue
qiyeweixinConsumeQueue
=
new
QiyeweixinConsumeQueue
();
public
static
ZhengwuDingdingConsumeQueue
zhengwuDingdingConsumeQueue
=
new
ZhengwuDingdingConsumeQueue
();
public
static
final
ZhengwuDingdingConsumeQueue
zhengwuDingdingConsumeQueue
=
new
ZhengwuDingdingConsumeQueue
();
public
static
DingdingConsumeQueue
dingdingConsumeQueue
=
new
DingdingConsumeQueue
();
public
static
final
DingdingConsumeQueue
dingdingConsumeQueue
=
new
DingdingConsumeQueue
();
public
static
WeLinkConsumeQueue
weLinkConsumeQueue
=
new
WeLinkConsumeQueue
();
public
static
final
WeLinkConsumeQueue
weLinkConsumeQueue
=
new
WeLinkConsumeQueue
();
public
static
PmsInnerConsumeQueue
pmsInnerConsumeQueue
=
new
PmsInnerConsumeQueue
();
public
static
final
PmsInnerConsumeQueue
pmsInnerConsumeQueue
=
new
PmsInnerConsumeQueue
();
public
static
MQConsumeQueue
mqConsumeQueue
=
new
MQConsumeQueue
();
public
static
final
MQConsumeQueue
mqConsumeQueue
=
new
MQConsumeQueue
();
public
static
Context
context
()
{
return
context
;
...
...
@@ -41,62 +44,57 @@ public class ThisApplication {
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_message_assemble_communicate
());
if
(
Config
.
communicate
().
wsEnable
())
{
wsConsumeQueue
.
start
();
}
if
(
Config
.
communicate
().
pmsEnable
())
{
pmsConsumeQueue
.
start
();
}
if
(
Config
.
communicate
().
calendarEnable
())
{
calendarConsumeQueue
.
start
();
}
MessageConnector
.
start
(
context
());
startQueue
();
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
clean
().
getEnable
()))
{
context
().
schedule
(
Clean
.
class
,
Config
.
communicate
().
clean
().
getCron
());
}
if
(
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getEnable
())
&&
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getMessageEnable
()))
{
qiyeweixinConsumeQueue
.
start
();
}
if
(
BooleanUtils
.
isTrue
(
Config
.
zhengwuDingding
().
getEnable
())
&&
BooleanUtils
.
isTrue
(
Config
.
zhengwuDingding
().
getMessageEnable
()))
{
zhengwuDingdingConsumeQueue
.
start
();
}
if
(
Config
.
dingding
().
getEnable
()
&&
Config
.
dingding
().
getMessageEnable
())
{
dingdingConsumeQueue
.
start
();
}
if
(
BooleanUtils
.
isTrue
(
Config
.
pushConfig
().
getEnable
()))
{
pmsInnerConsumeQueue
.
start
();
}
if
(
Config
.
weLink
().
getEnable
()
&&
Config
.
weLink
().
getMessageEnable
())
{
weLinkConsumeQueue
.
start
();
}
if
(
Config
.
mq
().
getEnable
())
{
mqConsumeQueue
.
start
();
}
MessageConnector
.
start
(
context
());
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
cronMq
().
getEnable
()))
{
context
().
schedule
(
TriggerMq
.
class
,
Config
.
communicate
().
cronMq
().
getCron
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
private
static
void
startQueue
()
throws
Exception
{
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
wsEnable
()))
{
context
().
startQueue
(
wsConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
pmsEnable
()))
{
context
().
startQueue
(
pmsConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
communicate
().
calendarEnable
()))
{
context
().
startQueue
(
calendarConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getEnable
())
&&
BooleanUtils
.
isTrue
(
Config
.
qiyeweixin
().
getMessageEnable
()))
{
context
().
startQueue
(
qiyeweixinConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
zhengwuDingding
().
getEnable
())
&&
BooleanUtils
.
isTrue
(
Config
.
zhengwuDingding
().
getMessageEnable
()))
{
context
().
startQueue
(
zhengwuDingdingConsumeQueue
);
}
if
(
Config
.
dingding
().
getEnable
()
&&
Config
.
dingding
().
getMessageEnable
())
{
context
().
startQueue
(
dingdingConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
pushConfig
().
getEnable
()))
{
context
().
startQueue
(
pmsInnerConsumeQueue
);
}
if
(
Config
.
weLink
().
getEnable
()
&&
Config
.
weLink
().
getMessageEnable
())
{
context
().
startQueue
(
weLinkConsumeQueue
);
}
if
(
BooleanUtils
.
isTrue
(
Config
.
mq
().
getEnable
()))
{
context
().
startQueue
(
mqConsumeQueue
);
}
}
public
static
void
destroy
()
{
try
{
CacheManager
.
shutdown
();
wsConsumeQueue
.
stop
();
pmsConsumeQueue
.
stop
();
calendarConsumeQueue
.
stop
();
qiyeweixinConsumeQueue
.
stop
();
zhengwuDingdingConsumeQueue
.
stop
();
dingdingConsumeQueue
.
stop
();
pmsInnerConsumeQueue
.
stop
();
weLinkConsumeQueue
.
stop
();
MessageConnector
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
o2server/x_mind_assemble_control/src/main/java/com/x/mind/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -8,8 +8,13 @@ import com.x.base.core.project.message.MessageConnector;
import
com.x.mind.assemble.control.queue.QueueShareNotify
;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
QueueShareNotify
queueShareNotify
;
public
static
final
QueueShareNotify
queueShareNotify
=
new
QueueShareNotify
()
;
public
static
Context
context
()
{
return
context
;
...
...
@@ -19,7 +24,6 @@ public class ThisApplication {
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_mind_assemble_control
());
queueShareNotify
=
new
QueueShareNotify
();
MessageConnector
.
start
(
context
());
context
().
startQueue
(
queueShareNotify
);
}
catch
(
Exception
e
)
{
...
...
o2server/x_mind_assemble_control/src/main/webapp/describe/sources/com/x/mind/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -8,8 +8,13 @@ import com.x.base.core.project.message.MessageConnector;
import
com.x.mind.assemble.control.queue.QueueShareNotify
;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
QueueShareNotify
queueShareNotify
;
public
static
final
QueueShareNotify
queueShareNotify
=
new
QueueShareNotify
()
;
public
static
Context
context
()
{
return
context
;
...
...
@@ -19,7 +24,6 @@ public class ThisApplication {
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_mind_assemble_control
());
queueShareNotify
=
new
QueueShareNotify
();
MessageConnector
.
start
(
context
());
context
().
startQueue
(
queueShareNotify
);
}
catch
(
Exception
e
)
{
...
...
@@ -30,6 +34,7 @@ public class ThisApplication {
public
static
void
destroy
()
{
try
{
CacheManager
.
shutdown
();
queueShareNotify
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
o2server/x_okr_assemble_control/src/main/java/com/x/okr/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -20,13 +20,17 @@ import com.x.okr.assemble.control.service.OkrConfigSystemService;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Map
<
String
,
CacheImportFileStatus
>
importFileStatusMap
=
new
HashMap
<
String
,
CacheImportFileStatus
>();
public
static
final
String
OKRMANAGER
=
"OKRManager"
;
public
static
QueueWorkDynamicRecord
queueWorkDynamicRecord
;
public
static
final
QueueWorkDynamicRecord
queueWorkDynamicRecord
=
new
QueueWorkDynamicRecord
()
;
public
static
Context
context
()
{
return
context
;
...
...
@@ -36,11 +40,8 @@ public class ThisApplication {
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_okr_assemble_control
());
queueWorkDynamicRecord
=
new
QueueWorkDynamicRecord
();
context
().
startQueue
(
queueWorkDynamicRecord
);
new
OkrConfigSystemService
().
initAllSystemConfig
();
// 每天凌晨2点执行一次
context
.
schedule
(
St_WorkReportContent
.
class
,
"0 0 2 * * ?"
);
// 每天凌晨2点30执行一次
...
...
o2server/x_okr_assemble_control/src/main/webapp/describe/sources/com/x/okr/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -20,13 +20,17 @@ import com.x.okr.assemble.control.service.OkrConfigSystemService;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Map
<
String
,
CacheImportFileStatus
>
importFileStatusMap
=
new
HashMap
<
String
,
CacheImportFileStatus
>();
public
static
final
String
OKRMANAGER
=
"OKRManager"
;
public
static
QueueWorkDynamicRecord
queueWorkDynamicRecord
;
public
static
final
QueueWorkDynamicRecord
queueWorkDynamicRecord
=
new
QueueWorkDynamicRecord
()
;
public
static
Context
context
()
{
return
context
;
...
...
@@ -36,11 +40,8 @@ public class ThisApplication {
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_okr_assemble_control
());
queueWorkDynamicRecord
=
new
QueueWorkDynamicRecord
();
context
().
startQueue
(
queueWorkDynamicRecord
);
new
OkrConfigSystemService
().
initAllSystemConfig
();
// 每天凌晨2点执行一次
context
.
schedule
(
St_WorkReportContent
.
class
,
"0 0 2 * * ?"
);
// 每天凌晨2点30执行一次
...
...
@@ -63,6 +64,7 @@ public class ThisApplication {
public
static
void
destroy
()
{
try
{
CacheManager
.
shutdown
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
o2server/x_organization_assemble_authentication/src/main/java/com/x/organization/assemble/authentication/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -10,7 +10,11 @@ import com.x.organization.assemble.authentication.schedule.CleanupOauthCode;
public
class
ThisApplication
{
public
static
QueueLoginRecord
queueLoginRecord
;
private
ThisApplication
()
{
// nothing
}
public
static
final
QueueLoginRecord
queueLoginRecord
=
new
QueueLoginRecord
();
protected
static
Context
context
;
...
...
@@ -22,7 +26,6 @@ public class ThisApplication {
try
{
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_organization_assemble_authentication
());
queueLoginRecord
=
new
QueueLoginRecord
();
context
.
startQueue
(
queueLoginRecord
);
context
.
schedule
(
CleanupBind
.
class
,
"0 */15 * * * ?"
);
context
.
schedule
(
CleanupOauthCode
.
class
,
"0 */15 * * * ?"
);
...
...
o2server/x_organization_assemble_control/src/main/java/com/x/organization/assemble/control/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_organization_assemble_express/src/main/java/com/x/organization/assemble/express/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_organization_assemble_personal/src/main/java/com/x/organization/assemble/personal/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -8,6 +8,10 @@ import com.x.organization.assemble.personal.schedule.DisableExpiredEmpower;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_portal_assemble_designer/src/main/java/com/x/portal/assemble/designer/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_portal_assemble_surface/src/main/java/com/x/portal/assemble/surface/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_portal_assemble_surface/src/main/webapp/describe/sources/com/x/portal/assemble/surface/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
@@ -24,6 +28,7 @@ public class ThisApplication {
public
static
void
destroy
()
{
try
{
CacheManager
.
shutdown
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
o2server/x_processplatform_assemble_bam/src/main/java/com/x/processplatform/assemble/bam/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -11,6 +11,10 @@ import com.x.processplatform.assemble.bam.schedule.StateTimer;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_processplatform_assemble_bam/src/main/webapp/describe/sources/com/x/processplatform/assemble/bam/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -11,6 +11,10 @@ import com.x.processplatform.assemble.bam.schedule.StateTimer;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
@@ -31,6 +35,7 @@ public class ThisApplication {
public
static
void
destroy
()
{
try
{
CacheManager
.
shutdown
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
o2server/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -8,13 +8,17 @@ import com.x.base.core.project.message.MessageConnector;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
ProjectionExecuteQueue
projectionExecuteQueue
=
new
ProjectionExecuteQueue
();
public
static
MappingExecuteQueue
mappingExecuteQueue
=
new
MappingExecuteQueue
();
public
static
FormVersionQueue
formVersionQueue
=
new
FormVersionQueue
();
public
static
ProcessVersionQueue
processVersionQueue
=
new
ProcessVersionQueue
();
public
static
ScriptVersionQueue
scriptVersionQueue
=
new
ScriptVersionQueue
();
public
static
final
ProjectionExecuteQueue
projectionExecuteQueue
=
new
ProjectionExecuteQueue
();
public
static
final
MappingExecuteQueue
mappingExecuteQueue
=
new
MappingExecuteQueue
();
public
static
final
FormVersionQueue
formVersionQueue
=
new
FormVersionQueue
();
public
static
final
ProcessVersionQueue
processVersionQueue
=
new
ProcessVersionQueue
();
public
static
final
ScriptVersionQueue
scriptVersionQueue
=
new
ScriptVersionQueue
();
public
static
Context
context
()
{
return
context
;
...
...
@@ -25,11 +29,11 @@ public class ThisApplication {
CacheManager
.
init
(
context
.
clazz
().
getSimpleName
());
LoggerFactory
.
setLevel
(
Config
.
logLevel
().
x_processplatform_assemble_designer
());
MessageConnector
.
start
(
context
());
projectionExecuteQueue
.
start
(
);
mappingExecuteQueue
.
start
(
);
formVersionQueue
.
start
(
);
processVersionQueue
.
start
(
);
scriptVersionQueue
.
start
(
);
context
().
startQueue
(
projectionExecuteQueue
);
context
().
startQueue
(
mappingExecuteQueue
);
context
().
startQueue
(
formVersionQueue
);
context
().
startQueue
(
processVersionQueue
);
context
().
startQueue
(
scriptVersionQueue
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -38,11 +42,6 @@ public class ThisApplication {
public
static
void
destroy
()
{
try
{
CacheManager
.
shutdown
();
projectionExecuteQueue
.
stop
();
mappingExecuteQueue
.
stop
();
formVersionQueue
.
stop
();
processVersionQueue
.
stop
();
scriptVersionQueue
.
stop
();
MessageConnector
.
stop
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -8,6 +8,10 @@ import com.x.processplatform.assemble.surface.schedule.CleanKeyLock;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -21,13 +21,17 @@ import org.apache.commons.lang3.BooleanUtils;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
SyncJaxrsInvokeQueue
syncJaxrsInvokeQueue
=
new
SyncJaxrsInvokeQueue
();
public
static
final
SyncJaxrsInvokeQueue
syncJaxrsInvokeQueue
=
new
SyncJaxrsInvokeQueue
();
public
static
SyncJaxwsInvokeQueue
syncJaxwsInvokeQueue
=
new
SyncJaxwsInvokeQueue
();
public
static
final
SyncJaxwsInvokeQueue
syncJaxwsInvokeQueue
=
new
SyncJaxwsInvokeQueue
();
public
static
SyncEmbedQueue
syncEmbedQueue
=
new
SyncEmbedQueue
();
public
static
final
SyncEmbedQueue
syncEmbedQueue
=
new
SyncEmbedQueue
();
public
static
Context
context
()
{
return
context
;
...
...
o2server/x_program_center/src/main/java/com/x/program/center/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -5,6 +5,8 @@ import java.util.List;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
org.apache.commons.lang3.BooleanUtils
;
import
com.google.gson.internal.LinkedTreeMap
;
import
com.x.base.core.project.config.Config
;
import
com.x.base.core.project.logger.LoggerFactory
;
...
...
@@ -28,23 +30,27 @@ import com.x.program.center.schedule.ZhengwuDingdingSyncOrganizationTrigger;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
return
context
;
}
public
static
CenterQueue
centerQueue
=
new
CenterQueue
();
public
static
final
CenterQueue
centerQueue
=
new
CenterQueue
();
public
static
LogQueue
logQueue
=
new
LogQueue
();
public
static
final
LogQueue
logQueue
=
new
LogQueue
();
public
static
List
<
Object
>
dingdingSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
final
List
<
Object
>
dingdingSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
List
<
Object
>
weLinkSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
final
List
<
Object
>
weLinkSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
List
<
Object
>
zhengwuDingdingSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
final
List
<
Object
>
zhengwuDingdingSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
List
<
Object
>
qiyeweixinSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
final
List
<
Object
>
qiyeweixinSyncOrganizationCallbackRequest
=
new
ArrayList
<>();
public
static
Map
<
String
,
Map
<
String
,
LinkedTreeMap
>>
metricsReportMap
=
new
ConcurrentHashMap
<>();
...
...
@@ -56,7 +62,7 @@ public class ThisApplication {
context
().
startQueue
(
logQueue
);
/* 政务钉钉拉入同步 */
if
(
Config
.
zhengwuDingding
().
getEnable
(
))
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
zhengwuDingding
().
getEnable
()
))
{
/* 启动同步任务 */
context
().
scheduleLocal
(
ZhengwuDingdingSyncOrganization
.
class
,
Config
.
zhengwuDingding
().
getSyncCron
());
/* 添加一个强制同步任务 */
...
...
@@ -64,7 +70,7 @@ public class ThisApplication {
Config
.
zhengwuDingding
().
getForceSyncCron
());
}
/* 企业微信拉入同步 */
if
(
Config
.
qiyeweixin
().
getEnable
(
))
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
qiyeweixin
().
getEnable
()
))
{
/* 启动同步任务 */
context
().
scheduleLocal
(
QiyeweixinSyncOrganization
.
class
,
Config
.
qiyeweixin
().
getSyncCron
());
/* 添加一个强制同步任务 */
...
...
@@ -72,14 +78,14 @@ public class ThisApplication {
Config
.
qiyeweixin
().
getForceSyncCron
());
}
/* 钉钉同步 */
if
(
Config
.
dingding
().
getEnable
(
))
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
dingding
().
getEnable
()
))
{
/* 启动同步任务 */
context
().
scheduleLocal
(
DingdingSyncOrganization
.
class
,
Config
.
dingding
().
getSyncCron
());
/* 添加一个强制同步任务 */
context
().
scheduleLocal
(
DingdingSyncOrganizationTrigger
.
class
,
Config
.
dingding
().
getForceSyncCron
());
}
/* WeLink同步 */
if
(
Config
.
weLink
().
getEnable
(
))
{
if
(
BooleanUtils
.
isNotTrue
(
Config
.
weLink
().
getEnable
()
))
{
/* 启动同步任务 */
context
().
scheduleLocal
(
WeLinkSyncOrganization
.
class
,
Config
.
weLink
().
getSyncCron
());
/* 添加一个强制同步任务 */
...
...
o2server/x_query_assemble_designer/src/main/java/com/x/query/assemble/designer/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_query_assemble_surface/src/main/java/com/x/query/assemble/surface/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -7,6 +7,10 @@ import com.x.base.core.project.logger.LoggerFactory;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_query_service_processing/src/main/java/com/x/query/service/processing/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -12,6 +12,10 @@ import com.x.query.service.processing.schedule.CrawlWorkCompleted;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_query_service_processing/src/main/webapp/describe/sources/com/x/query/service/processing/ThisApplication.java
浏览文件 @
7f903e9c
...
...
@@ -12,6 +12,10 @@ import com.x.query.service.processing.schedule.CrawlWorkCompleted;
public
class
ThisApplication
{
private
ThisApplication
()
{
// nothing
}
protected
static
Context
context
;
public
static
Context
context
()
{
...
...
o2server/x_query_service_processing/src/main/webapp/describe/sources/com/x/query/service/processing/jaxrs/test/ActionGroup2.java
浏览文件 @
7f903e9c
package
com.x.query.service.processing.jaxrs.test
;
import
java.util.ArrayList
;
import
javax.script.Bindings
;
import
javax.script.ScriptContext
;
import
javax.script.ScriptEngine
;
import
javax.script.SimpleScriptContext
;
import
com.x.base.core.container.EntityManagerContainer
;
import
com.x.base.core.container.factory.EntityManagerContainerFactory
;
...
...
@@ -19,7 +24,12 @@ class ActionGroup2 extends BaseAction {
try
(
EntityManagerContainer
emc
=
EntityManagerContainerFactory
.
instance
().
create
())
{
ActionResult
<
Wo
>
result
=
new
ActionResult
<>();
ScriptEngine
engine
=
ScriptFactory
.
newScriptEngine
();
Object
o
=
engine
.
eval
(
"this.data && this.data.length"
);
ScriptContext
scriptContext
=
new
SimpleScriptContext
();
Bindings
bindings
=
scriptContext
.
getBindings
(
ScriptContext
.
ENGINE_SCOPE
);
bindings
.
put
(
"data"
,
new
ArrayList
<>());
engine
.
setContext
(
scriptContext
);
engine
.
eval
(
"var o = this.data && this.data.length;"
);
Object
o
=
engine
.
eval
(
"o;"
);
System
.
out
.
println
(
o
.
getClass
());
return
result
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录