Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
xpub
xpub-epmc
Commits
bc1226d7
Commit
bc1226d7
authored
Jul 08, 2019
by
Audrey Hamelers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#815
parent
799e8ad2
Pipeline
#13023
passed with stages
in 5 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
server/scheduled-alerts/stalledCheck.js
server/scheduled-alerts/stalledCheck.js
+3
-3
No files found.
server/scheduled-alerts/stalledCheck.js
View file @
bc1226d7
...
...
@@ -23,7 +23,7 @@ async function alertIncomplete() {
const
incomplete
=
await
Manuscript
.
query
()
.
whereIn
(
'
status
'
,
[
'
INITIAL
'
,
'
READY
'
])
.
whereRaw
(
'
"updated"::date = current_date - interval
\'
1 day
\'
or "updated"::date = current_date - interval
\'
7 days
\'
'
,
'
(
"updated"::date = current_date - interval
\'
1 day
\'
or "updated"::date = current_date - interval
\'
7 days
\'
)
'
,
)
.
whereNull
(
'
manuscript.deleted
'
)
.
eager
(
'
[teams.users.identities]
'
)
...
...
@@ -67,7 +67,7 @@ async function alertStalled() {
const
stalled
=
await
Manuscript
.
query
()
.
whereIn
(
'
status
'
,
[
'
in-review
'
,
'
xml-review
'
])
.
whereRaw
(
'
"updated"::date = current_date - interval
\'
1 week
\'
or "updated"::date = current_date - interval
\'
2 weeks
\'
'
,
'
(
"updated"::date = current_date - interval
\'
1 week
\'
or "updated"::date = current_date - interval
\'
2 weeks
\'
)
'
,
)
.
whereNull
(
'
manuscript.deleted
'
)
.
eager
(
'
[notes, teams.users.identities]
'
)
...
...
@@ -135,7 +135,7 @@ async function alertNeedFix() {
const
needFix
=
await
Manuscript
.
query
()
.
where
(
'
status
'
,
'
submission-error
'
)
.
whereRaw
(
'
"updated"::date = current_date - interval
\'
1 week
\'
or "updated"::date = current_date - interval
\'
2 weeks
\'
'
,
'
(
"updated"::date = current_date - interval
\'
1 week
\'
or "updated"::date = current_date - interval
\'
2 weeks
\'
)
'
,
)
.
whereNull
(
'
manuscript.deleted
'
)
.
eager
(
'
[notes, teams.users.identities]
'
)
...
...
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