Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
server
Manage
Activity
Members
Labels
Plan
Issues
25
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cokoapps
server
Commits
dcd352ad
Commit
dcd352ad
authored
4 years ago
by
Yannis Barlas
Browse files
Options
Downloads
Patches
Plain Diff
feat(server): add cron support
parent
5dffd0fb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
package.json
+1
-0
1 addition, 0 deletions
package.json
src/app.js
+5
-0
5 additions, 0 deletions
src/app.js
src/index.js
+3
-0
3 additions, 0 deletions
src/index.js
yarn.lock
+14
-1
14 additions, 1 deletion
yarn.lock
with
23 additions
and
1 deletion
package.json
+
1
−
0
View file @
dcd352ad
...
...
@@ -35,6 +35,7 @@
"
http-status-codes
"
:
"
^1.4.0
"
,
"
lodash
"
:
"
^4.17.15
"
,
"
morgan
"
:
"
^1.10.0
"
,
"
node-cron
"
:
"
^2.0.3
"
,
"
passport
"
:
"
^0.4.1
"
,
"
pubsweet-server
"
:
"
^13.9.4
"
,
"
waait
"
:
"
^1.0.5
"
...
...
This diff is collapsed.
Click to expand it.
src/app.js
+
5
−
0
View file @
dcd352ad
...
...
@@ -103,6 +103,11 @@ const configureApp = app => {
.
json
({
message
:
err
.
message
})
})
if
(
config
.
has
(
'
pubsweet-server.cron.path
'
))
{
/* eslint-disable-next-line import/no-dynamic-require */
require
(
config
.
get
(
'
pubsweet-server.cron.path
'
))
}
// Actions to perform when the HTTP server starts listening
app
.
onListen
=
async
server
=>
{
const
{
...
...
This diff is collapsed.
Click to expand it.
src/index.js
+
3
−
0
View file @
dcd352ad
const
cron
=
require
(
'
node-cron
'
)
const
authentication
=
require
(
'
pubsweet-server/src/authentication
'
)
const
app
=
require
(
'
./app
'
)
...
...
@@ -6,5 +8,6 @@ const createJWT = authentication.token.create
module
.
exports
=
{
app
,
cron
,
createJWT
,
}
This diff is collapsed.
Click to expand it.
yarn.lock
+
14
−
1
View file @
dcd352ad
...
...
@@ -4131,6 +4131,14 @@ nocache@2.1.0:
resolved "https://registry.yarnpkg.com/nocache/-/nocache-2.1.0.tgz#120c9ffec43b5729b1d5de88cd71aa75a0ba491f"
integrity sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q==
node-cron@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/node-cron/-/node-cron-2.0.3.tgz#b9649784d0d6c00758410eef22fa54a10e3f602d"
integrity sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==
dependencies:
opencollective-postinstall "^2.0.0"
tz-offset "0.0.1"
node-fetch@^2.1.2, node-fetch@^2.2.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
...
...
@@ -4307,7 +4315,7 @@ onetime@^5.1.0:
dependencies:
mimic-fn "^2.1.0"
opencollective-postinstall@^2.0.2:
opencollective-postinstall@^2.0.0,
opencollective-postinstall@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89"
integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==
...
...
@@ -5757,6 +5765,11 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
tz-offset@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/tz-offset/-/tz-offset-0.0.1.tgz#fef920257024d3583ed9072a767721a18bdb8a76"
integrity sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ==
uglify-js@^3.1.4:
version "3.8.0"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.0.tgz#f3541ae97b2f048d7e7e3aa4f39fd8a1f5d7a805"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment