Joe Gregorio | 239855e | 2011-05-04 14:22:30 -0400 | [diff] [blame] | 1 | This acts as a sample as well as commandline tool for accessing Google TaskQueue |
| 2 | APIs. |
| 3 | |
| 4 | Installation |
| 5 | ============ |
| 6 | |
| 7 | To install, simply say |
| 8 | |
| 9 | $ python setup.py install --record=files.txt |
| 10 | |
| 11 | to install the files and record what files are installed in files.txt. |
| 12 | Make sure that you have already installed the google-python-client-libraries |
| 13 | using the setup.py in the toplevel directory. |
| 14 | |
| 15 | You may need root priveleges for install. |
| 16 | |
| 17 | Running |
| 18 | ======= |
| 19 | This sample provides following: |
| 20 | 1. gtaskqueue: This works as a command-line tool to access Google TaskQueue |
| 21 | API. You can perform various operations on taskqueues such as leastask, |
| 22 | getask, listtasks, deletetask, getqueue. |
| 23 | Example usage: |
| 24 | i. To lease a task |
| 25 | gtaskqueue leasetask --taskqueue_name=<your queue_name> |
| 26 | -lease_secs=30 --project_name=<your appengine app_name> |
| 27 | ii. To get stats on a queue |
| 28 | gtaskqueue getqueue --taskqueue_name=<your queue_name> |
| 29 | --project_name=<your appengine app_name> --get_stats |
| 30 | |
| 31 | 2. gtaskqueue_puller: This works as a worker to continuously pull tasks enqueued |
| 32 | by your app,perform the task and the post the output back to your app. |
| 33 | Example Usage: |
| 34 | gtaskqueue_puller --taskqueue_name=<your queue_name> |
| 35 | -lease_secs=30 --project_name=<your appengine app_name> |
| 36 | --executable_binary=”cat” --output_url=<url location if you want to pos the data |
| 37 | back(optional)> |
| 38 | |
| 39 | Third Party Libraries |
| 40 | ===================== |
| 41 | |
| 42 | These libraries will be installed when you install the client library: |
| 43 | |
| 44 | http://code.google.com/p/httplib2 |
| 45 | http://code.google.com/p/uri-templates |
| 46 | http://github.com/simplegeo/python-oauth2 |