summaryrefslogtreecommitdiffstats
path: root/facebook_scraping/limits.py
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2014-10-24 12:16:51 -0400
committerThibaut Horel <thibaut.horel@gmail.com>2014-10-24 12:16:51 -0400
commitece1d828d53d6123fcecb5ea8bf9b126d1728ccc (patch)
treeb669382d0e5f1234556d1aeb7fa919891510b24d /facebook_scraping/limits.py
parent7426d8ff0e7969eb1a86bdb5bec8a0c971309e2b (diff)
downloadfast-seeding-ece1d828d53d6123fcecb5ea8bf9b126d1728ccc.tar.gz
Add code
Diffstat (limited to 'facebook_scraping/limits.py')
-rw-r--r--facebook_scraping/limits.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/facebook_scraping/limits.py b/facebook_scraping/limits.py
new file mode 100644
index 0000000..8ce38cf
--- /dev/null
+++ b/facebook_scraping/limits.py
@@ -0,0 +1,6 @@
+from celery import Celery
+app = Celery('tasks', broker='amqp://guest@horel.org//')
+print app.control.rate_limit('tasks.NumFollowers', '4/m', destination=['celery@ip-172-31-42-158'], reply=True)
+print app.control.rate_limit('tasks.ListFollowers', '4/m', destination=['celery@ip-172-31-42-158'], reply=True)
+print app.control.rate_limit('tasks.NumFollowers', '1/h', destination=['celery@ip-172-31-42-159'], reply=True)
+print app.control.rate_limit('tasks.ListFollowers', '1/h', destination=['celery@ip-172-31-42-159'], reply=True)