mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-31 11:57:50 +01:00
Patch: delay for Fetch task
This commit is contained in:
@@ -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> {
|
||||||
|
|||||||
@@ -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> {
|
||||||
|
|||||||
@@ -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> {
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user