Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
204aa0d2
Commit
204aa0d2
authored
May 14, 2019
by
nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notification batch setup
parent
166b3e6a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
NotificationBatch.java
cmsWebApp/src/performa/batch/NotificationBatch.java
+35
-0
GeneralConfig_adminPortal.xml
...root/extensions/adminportal/GeneralConfig_adminPortal.xml
+13
-0
No files found.
cmsWebApp/src/performa/batch/NotificationBatch.java
0 → 100644
View file @
204aa0d2
package
performa
.
batch
;
import
java.util.Calendar
;
import
oneit.appservices.batch.ORMBatch
;
import
oneit.logging.LogLevel
;
import
oneit.logging.LogMgr
;
import
oneit.logging.LoggingArea
;
import
oneit.objstore.ObjectTransaction
;
import
oneit.objstore.StorageException
;
import
oneit.objstore.rdbms.filters.InFilter
;
import
oneit.objstore.rdbms.filters.LessThanEqualFilter
;
import
oneit.utils.DateDiff
;
import
oneit.utils.parsers.FieldException
;
import
performa.orm.Job
;
import
performa.orm.types.JobStatus
;
public
class
NotificationBatch
extends
ORMBatch
{
public
static
LoggingArea
NOTIFICATION_BATCH
=
LoggingArea
.
createLoggingArea
(
"NotificationBatch"
);
@Override
public
void
run
(
ObjectTransaction
ot
)
throws
StorageException
,
FieldException
{
LogMgr
.
log
(
NOTIFICATION_BATCH
,
LogLevel
.
PROCESSING1
,
"RUNNING Notification Batch"
);
Job
[]
closedJobs
=
Job
.
SearchByAll
()
.
andJobStatus
(
new
InFilter
<>(
JobStatus
.
COMPLETE
,
JobStatus
.
FILLED
))
.
andLastStatusChangeDate
(
new
LessThanEqualFilter
<>(
DateDiff
.
add
(
DateDiff
.
getToday
(),
14
,
Calendar
.
DATE
)))
.
search
(
ot
);
}
}
\ No newline at end of file
cmsWebApp/webroot/extensions/adminportal/GeneralConfig_adminPortal.xml
View file @
204aa0d2
...
...
@@ -165,6 +165,19 @@
<TASK
factory=
"Participant"
class=
"oneit.appservices.batch.DefaultTask"
lockName=
"performa"
>
<RUN
class=
"performa.batch.NotificationBatch"
factory=
"Participant"
/>
<WHEN
factory=
"MetaComponent"
component=
"BatchSchedule"
selector=
"performa.runbatch"
>
<NODE
name=
"schedule"
class=
"oneit.appservices.batch.DailySchedule"
>
<NODE
name=
"hourOfDay"
factory=
"Integer"
value=
"0"
/>
<NODE
name=
"minuteOfHour"
factory=
"Integer"
value=
"10"
/>
</NODE>
</WHEN>
</TASK>
<TASK
factory=
"Participant"
class=
"oneit.appservices.batch.DefaultTask"
lockName=
"performa"
>
<RUN
class=
"performa.batch.PullStripeDataBatch"
factory=
"Participant"
/>
<WHEN
factory=
"MetaComponent"
component=
"BatchSchedule"
selector=
"performa.runbatch"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment