refactor: Remove test run and completion check for flick triggers

This commit is contained in:
Faruk AYDIN
2022-10-28 13:43:01 +02:00
parent c3a54e0c69
commit d8e1f6df81
3 changed files with 13 additions and 22 deletions

View File

@@ -19,7 +19,7 @@ const extraFields = [
'url_t', 'url_t',
'url_s', 'url_s',
'url_m', 'url_m',
'url_o' 'url_o',
].join(','); ].join(',');
const newAlbums = async ($: IGlobalVariable) => { const newAlbums = async ($: IGlobalVariable) => {
@@ -42,17 +42,14 @@ const newAlbums = async ($: IGlobalVariable) => {
pages = photosets.pages; pages = photosets.pages;
for (const photoset of photosets.photoset) { for (const photoset of photosets.photoset) {
if ($.flow.isAlreadyProcessed(photoset.id) && !$.execution.testRun)
return;
$.pushTriggerItem({ $.pushTriggerItem({
raw: photoset, raw: photoset,
meta: { meta: {
internalId: photoset.id as string internalId: photoset.id as string,
} },
}) });
} }
} while (page <= pages && !$.execution.testRun); } while (page <= pages);
}; };
export default newAlbums; export default newAlbums;

View File

@@ -48,17 +48,14 @@ const newPhotos = async ($: IGlobalVariable) => {
pages = photos.pages; pages = photos.pages;
for (const photo of photos.photo) { for (const photo of photos.photo) {
if ($.flow.isAlreadyProcessed(photo.date_faved) && !$.execution.testRun)
return;
$.pushTriggerItem({ $.pushTriggerItem({
raw: photo, raw: photo,
meta: { meta: {
internalId: photo.date_faved as string internalId: photo.date_faved as string,
} },
}) });
} }
} while (page <= pages && !$.execution.testRun); } while (page <= pages);
}; };
export default newPhotos; export default newPhotos;

View File

@@ -43,17 +43,14 @@ const newPhotosInAlbum = async ($: IGlobalVariable) => {
pages = photoset.pages; pages = photoset.pages;
for (const photo of photoset.photo) { for (const photo of photoset.photo) {
if ($.flow.isAlreadyProcessed(photo.id) && !$.execution.testRun)
return;
$.pushTriggerItem({ $.pushTriggerItem({
raw: photo, raw: photo,
meta: { meta: {
internalId: photo.id as string internalId: photo.id as string,
} },
}) });
} }
} while (page <= pages && !$.execution.testRun); } while (page <= pages);
}; };
export default newPhotosInAlbum; export default newPhotosInAlbum;