Skip to content

Instantly share code, notes, and snippets.

@jwhitlock
Last active March 25, 2016 16:09
Show Gist options
  • Select an option

  • Save jwhitlock/bcfbfd97c11858e362c7 to your computer and use it in GitHub Desktop.

Select an option

Save jwhitlock/bcfbfd97c11858e362c7 to your computer and use it in GitHub Desktop.
BC: Manually reset scrape
# heroku run --app browsercompat ./manage.py shell_plus
from mdn.models import FeaturePage
from mdn.tasks import start_crawl
other = [
FeaturePage.STATUS_STARTING, # 0
FeaturePage.STATUS_META, # 1
FeaturePage.STATUS_PAGES, # 2
FeaturePage.STATUS_PARSING, # 3
FeaturePage.STATUS_ERROR, # 5
]
for fp in FeaturePage.objects.filter(status__in=other):
fp.reset()
start_crawl(fp.id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment