Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More validation before queuing a cron job after pull failure #101

Open
nickdaugherty opened this issue Jun 3, 2016 · 0 comments
Open

More validation before queuing a cron job after pull failure #101

nickdaugherty opened this issue Jun 3, 2016 · 0 comments

Comments

@nickdaugherty
Copy link
Contributor

When a pull fails, more validation should be performed before re-queuing the job.

$site = get_post( $site_id );
// Fetch the site url
$site_url = get_post_meta( $site->ID, 'syn_feed_url', true );
// Fetch the number of times we've tried to auto-retry
$site_auto_retry_count = (int) get_post_meta( $site_id, 'syn_failed_auto_retry_attempts', true );

Here, we need to verify that:

  1. The post exists
  2. The post is of the right type
  3. The post has a valid-looking syndication url

This will prevent situations where cron events exist for invalid posts, but they keep requeuing indefinitely due to a failure to detect these conditions here.

@emrikol emrikol added this to the v2.1 milestone Aug 2, 2016
@philipjohn philipjohn modified the milestones: v2.1, v2.2 Jan 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants