Remove cron check
This commit is contained in:
parent
309612cc13
commit
4ede03ba76
|
|
@ -1,10 +1,6 @@
|
||||||
const dayjs = require('dayjs');
|
const dayjs = require('dayjs');
|
||||||
|
|
||||||
module.exports = async (req, res) => {
|
module.exports = async (req, res) => {
|
||||||
if (req.header('X-Appengine-Cron') === undefined) {
|
|
||||||
return res.status(400).send('This task can only be run from a cron job');
|
|
||||||
}
|
|
||||||
|
|
||||||
const threeMonthsAgo = dayjs().subtract(3, 'month').unix();
|
const threeMonthsAgo = dayjs().subtract(3, 'month').unix();
|
||||||
|
|
||||||
console.log(`Running cleanup task at ${dayjs().format('h:mma D MMM YYYY')}`);
|
console.log(`Running cleanup task at ${dayjs().format('h:mma D MMM YYYY')}`);
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
const dayjs = require('dayjs');
|
const dayjs = require('dayjs');
|
||||||
|
|
||||||
module.exports = async (req, res) => {
|
module.exports = async (req, res) => {
|
||||||
if (req.header('X-Appengine-Cron') === undefined) {
|
|
||||||
return res.status(400).send('This task can only be run from a cron job');
|
|
||||||
}
|
|
||||||
|
|
||||||
const threeMonthsAgo = dayjs().subtract(3, 'month').unix();
|
const threeMonthsAgo = dayjs().subtract(3, 'month').unix();
|
||||||
|
|
||||||
console.log(`Running LEGACY cleanup task at ${dayjs().format('h:mma D MMM YYYY')}`);
|
console.log(`Running LEGACY cleanup task at ${dayjs().format('h:mma D MMM YYYY')}`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue