Browse Source

Sleep a bit in between API queries.

tags/v0.1^2
Ben Kurtovic 13 years ago
parent
commit
656d904515
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      bot/tasks/afc_history.py

+ 2
- 0
bot/tasks/afc_history.py View File

@@ -3,6 +3,7 @@
from datetime import datetime, timedelta
from os.path import expanduser
from threading import Lock
from time import sleep

import oursql

@@ -62,6 +63,7 @@ class Task(BaseTask):
category = generator.next()
date = category.title().split("/")[-1]
self.update_date(date, category)
sleep(15)
self.logger.info("Update complete")

def generate(self, data):


Loading…
Cancel
Save