mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
/!\ Use a dedicated config file for development
It means you have to replace NODE_ENV=test to NODE_ENV=dev if you use it npm run dev:* commands are already updated
This commit is contained in:
parent
630d0a1bf5
commit
9452d4fd33
26 changed files with 207 additions and 106 deletions
|
@ -1,5 +1,5 @@
|
|||
import { VideoViewModel } from '@server/models/view/video-view'
|
||||
import { isTestInstance } from '../../../helpers/core-utils'
|
||||
import { isTestOrDevInstance } from '../../../helpers/core-utils'
|
||||
import { logger } from '../../../helpers/logger'
|
||||
import { VideoModel } from '../../../models/video/video'
|
||||
import { Redis } from '../../redis'
|
||||
|
@ -8,7 +8,7 @@ async function processVideosViewsStats () {
|
|||
const lastHour = new Date()
|
||||
|
||||
// In test mode, we run this function multiple times per hour, so we don't want the values of the previous hour
|
||||
if (!isTestInstance()) lastHour.setHours(lastHour.getHours() - 1)
|
||||
if (!isTestOrDevInstance()) lastHour.setHours(lastHour.getHours() - 1)
|
||||
|
||||
const hour = lastHour.getHours()
|
||||
const startDate = lastHour.setMinutes(0, 0, 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue