WebDevStudios / Automatic-Featured-Images-from-Videos

If a YouTube or Vimeo video exists in the first few paragraphs of a post, automatically set the post's featured image to that vidoe's thumbnail.
33 stars 24 forks source link

Bulk Processing - "Processing" indicator never goes away #37

Closed CrowdForge closed 6 years ago

CrowdForge commented 7 years ago

After the process is complete, the 'Processing' indicator is never removed or changed to reflect the process is complete.

binarygary commented 7 years ago

@CrowdForge thanks for digging into this branch. This bug might be a result of how the processing is actually handled.
The bulk process processes the first 10 posts that apply and then if there are any remaining posts to process it reschedules itself to run 10 minutes later.
During that time it will show 'Processing'.

The logic currently is set to not display a button if there are no posts that need to be processed.

I wonder 2 things: First, did it actually process all the posts?
Second, what criteria did you use to determine that it was done processing? (was there still a scheduled task?)

CrowdForge commented 7 years ago

@binarygary I cheated. I edited the ajax to console.log('all done'); when it ran out of work.

CrowdForge commented 7 years ago

To clarify though, before I used the code to make sure it was reaching the end I did try just letting it set for a while. It was about an hour, for 3 posts. All 3 got thumbnails.

binarygary commented 7 years ago

I was super conservative in with the processing logic because this plugin is on .org I'm concerned about the potential shared hosting it may be used on.

Logic is as follows:

tw2113 commented 6 years ago

From what I can see with the present state, if we're set to "do_not_process" no button is appended. So the issue is technically resolved.