Patch: delay for Fetch task

This commit is contained in:
2022-04-14 22:58:04 +02:00
parent 64474dd44d
commit 55b197f64d
4 changed files with 4 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
import Logger from '@ioc:Adonis/Core/Logger' import Logger from '@ioc:Adonis/Core/Logger'
import { getCurrentPlayingFromSpotify, getSpotifyAccount, resetCurrentSongCache } from 'App/Utils/SongUtils' import { getCurrentPlayingFromSpotify, getSpotifyAccount, resetCurrentSongCache } from 'App/Utils/SongUtils'
const MS = 1000 const MS = 1000 // 1 second
let taskId let taskId
async function SpotifyCurrentListeningWatcher(): Promise<void> { async function SpotifyCurrentListeningWatcher(): Promise<void> {

View File

@@ -2,7 +2,7 @@ import Logger from '@ioc:Adonis/Core/Logger'
import { getCurrentPlayingFromCache } from 'App/Utils/SongUtils' import { getCurrentPlayingFromCache } from 'App/Utils/SongUtils'
import Song from 'App/Models/Song' import Song from 'App/Models/Song'
const MS = 10000 const MS = 3000 // 3 seconds
let taskId let taskId
async function LogSpotifyHistory(): Promise<void> { async function LogSpotifyHistory(): Promise<void> {

View File

@@ -1,7 +1,7 @@
import Logger from '@ioc:Adonis/Core/Logger' import Logger from '@ioc:Adonis/Core/Logger'
import { fetchDevelopingState } from 'App/Utils/StatesUtils' import { fetchDevelopingState } from 'App/Utils/StatesUtils'
const MS = 1000 * 2 * 60 // 2 min const MS = 1000 * 2 * 60 // 2 minutes
let taskId let taskId
export async function Activate(): Promise<void> { export async function Activate(): Promise<void> {

View File

@@ -4,7 +4,7 @@ import axios from 'axios'
import DevelopmentHour from 'App/Models/DevelopmentHour' import DevelopmentHour from 'App/Models/DevelopmentHour'
import { updateGithubReadmeStats } from 'App/Utils/UpdateGithubReadme' import { updateGithubReadmeStats } from 'App/Utils/UpdateGithubReadme'
const MS = 1000 * 5 * 60 // 5 min const MS = 1000 * 5 * 60 // 5 minutes
let taskId let taskId
interface StatsResponse { interface StatsResponse {