Only create refresh job if needed
This commit is contained in:
parent
f4800714f9
commit
f58094b257
|
@ -180,8 +180,7 @@ async function getOrCreateVideoAndAccountAndChannel (options: {
|
||||||
|
|
||||||
let videoFromDatabase = await fetchVideoByUrl(videoUrl, fetchType)
|
let videoFromDatabase = await fetchVideoByUrl(videoUrl, fetchType)
|
||||||
if (videoFromDatabase) {
|
if (videoFromDatabase) {
|
||||||
|
if (videoFromDatabase.isOutdated() && allowRefresh === true) {
|
||||||
if (allowRefresh === true) {
|
|
||||||
const refreshOptions = {
|
const refreshOptions = {
|
||||||
video: videoFromDatabase,
|
video: videoFromDatabase,
|
||||||
fetchedType: fetchType,
|
fetchedType: fetchType,
|
||||||
|
|
Loading…
Reference in New Issue