Commit 590a96d6 authored by Marcelo Jorge Vieira's avatar Marcelo Jorge Vieira

New upstream version 1.5

parents
*.pyc
build/
.coverage
*.report
*.egg-info
logs/
dist/
*.swp
*.swo
.tox/
language: python
python:
- "2.6"
- "2.7"
- "3.3"
# - "pypy"
# command to install dependencies
install:
- python setup.py install
# command to run tests
script: python setup.py test
services:
- redis-server
## Authors
* Matt George
* Craig Hawco
* Michael Russo
* Chris Song
* Whit Morriss
* Joe Shaw
* Yashwanth Nelapati
* Cezar Sa Espinola
* Alex Ezell
* Christy O'Reilly
* Kevin McConnell
* Bernardo Heynemann
* David Schoonover
* Rob Hudson
* Salimane Adjao Moustapha
* John Hobbs
* James M. Henderson
* Iraê Carvalho
* Fabien Reboia
* Peter Teichman
Inspired by Resque, by Chris Wanstrath
2011-03-01 whit <whit@surveymonkey.com>
* Added hooks for the worker to allow worker subclasses to insert
code before and after forking
##1.4.2 (2013-06-21)
* __str__ returns correctly with dsn
* worker_pids returns correct set of workers
* workers are re-registered on every job
* add exception metadata for after_perform method
* logger no longer overrides root logger
* support for redis db in dsn
##1.4.1 (2012-07-30)
* fix for non existent system signal for linux
* cleanup of setup.py and requirements
##1.4 (2012-06-?)
* added hooks for before and after perform methods
* fixed logging
*fixed problems with password authentication
##1.3 (2012-06-01)
* remove resweb from pyres
* resweb is now available at http://github.com/Pyres/resweb or on pypi
##1.2
* release with changes from pull requests
##1.1 (2011-06-16)
* api change based on redis-py
* setproctitle requirements fix
* change exception logging in worker
##1.0.1 (2011-04-12)
* fixed bug with tempaltes and media in resweb
* call to redis-py disconnect was failing, switched to connection.disconnect
* interval cast to int for pyres_worker script command
## 0.9.1 (2010-10-15)
* fixing issues #45, #46.
* #45 - resweb not working in chrome
* #46 - delayed_queue_schedule_size() returns incorrect value
* updated version requirement for redis-py
* added Failure docs from Alex._
## 0.9 (2010-08-05)
* added better logging to the project
## 0.8 (2010-04-24)
* added the pyres_manager and the horde module. This allows a more prefork like model for processing jobs.
* setproctitle usage. Allows better process titles when viewing via ps
* ability to delete and requeue failed items
## 0.7.5.1 (2010-03-18)
* fixed the pyres_scheduler script
* changed download link to remove v from version number
## 0.7.5 (2010-03-18)
* added feature to retry jobs based on a class attribute
## 0.7.1 (2010-03-16)
* bug fix for pruning workers.
## 0.7.0 (2010-03-05)
* delayed tasks
* resweb pagination
* switch stored timestamps to a unix timestamp
* updated documentation
* upgraded to redis-py 1.34.1
* switched from print statements to the logging module
* import errors on jobs are now reported in the failed queue
* prune dead workers
* small bugfixes in the resweb package
* improved failure formatting
* datetime json parser
## 0.5.0 (2010-0114)
* added new documentation to the project
* update setup.py
* preparing for semantic versioning
## 0.4.1 (2010-01-06)
* fixed issue with new failure package in distutils sdist
* changed setup.py to remove camel case, because it's ugly
## 0.4.0 (2010-01-06)
* added the basics of failure backend support
## 0.3.1 (2009-12-16)
* minor bug fix in worker.py
* merged in some setup.py niceties from dsc fork
* merged in better README info from dsc fork
## 0.3.0 (2009-12-10)
* updated setup.py
* refactored package for better testing
* resque namespacing by fakechris
* smarter import from string by fakechris
## 0.2.0 (2009-12-09)
* Better web interface via resweb
* Updated the api to be more inline with resque
* More tests.
## 0.1.0 (2009-12-01)
* First release.
Copyright (c) 2009-2013 Matt George
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
include requirements.txt
Pyres - a Resque clone
======================
[Resque](http://github.com/defunkt/resque) is a great implementation of a job queue by the people at github. It's written in ruby, which is great, but I primarily work in python. So I took on the task of porting over the code to python and PyRes was the result
## Project Goals
Because of some differences between ruby and python, there are a couple of places where I chose speed over correctness. The goal will be to eventually take the application and make it more pythonic without sacrificing the awesome functionality found in resque. At the same time, I hope to stay within the bounds of the original api and web interface.
## Travis CI
Currently, pyres is being tested via travis ci for python version 2.6, 2.7, and 3.3:
[![Build Status](https://secure.travis-ci.org/binarydud/pyres.png)](http://travis-ci.org/binarydud/pyres)
## Running Tests
1. Install nose: `$ easy_install nose`
2. Start redis: `$ redis-server [PATH_TO_YOUR_REDIS_CONFIG]`
3. Run nose: `$ nosetests` Or more verbosely: `$ nosetests -v`
##Mailing List
To join the list simply send an email to <pyres@librelist.com>. This
will subscribe you and send you information about your subscription,
include unsubscribe information.
The archive can be found at <http://librelist.com/browser/>.
## Information
* Code: `git clone git://github.com/binarydud/pyres.git`
* Home: <http://github.com/binarydud/pyres>
* Docs: <http://binarydud.github.com/pyres/>
* Bugs: <http://github.com/binarydud/pyres/issues>
* List: <pyres@librelist.com>
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf build/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
@echo
@echo "Build finished. The HTML pages are in build/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) build/dirhtml
@echo
@echo "Build finished. The HTML pages are in build/dirhtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in build/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in build/qthelp, like this:"
@echo "# qcollectiongenerator build/qthelp/PyRes.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile build/qthelp/PyRes.qhc"
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
@echo
@echo "Build finished; the LaTeX files are in build/latex."
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
"run these through (pdf)latex."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
@echo
@echo "The overview file is in build/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in build/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) build/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in build/doctest/output.txt."
@ECHO OFF
REM Command file for Sphinx documentation
set SPHINXBUILD=sphinx-build
set ALLSPHINXOPTS=-d build/doctrees %SPHINXOPTS% source
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. changes to make an overview over all changed/added/deprecated items
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (build\*) do rmdir /q /s %%i
del /q /s build\*
goto end
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% build/html
echo.
echo.Build finished. The HTML pages are in build/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% build/dirhtml
echo.
echo.Build finished. The HTML pages are in build/dirhtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% build/pickle
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% build/json
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% build/htmlhelp
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in build/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% build/qthelp
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in build/qthelp, like this:
echo.^> qcollectiongenerator build\qthelp\PyRes.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile build\qthelp\PyRes.ghc
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% build/latex
echo.
echo.Build finished; the LaTeX files are in build/latex.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% build/changes
echo.
echo.The overview file is in build/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% build/linkcheck
echo.
echo.Link check complete; look for any errors in the above output ^
or in build/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% build/doctest
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in build/doctest/output.txt.
goto end
)
:end
==============
How To Install
==============
Install in Sphinx
-----------------
Copy this directory into the ``sphinx/templates`` directory where Shpinx is installed. For example, a standard install of sphinx on Mac OS X is at ``/Library/Python/2.6/site-packages/Sphinx-0.6.3-py2.6.egg/``
Install Somewhere Else
----------------------
If you want to install this theme somewhere else, you will have to modify the ``conf.py`` file. ::
templates_path = ['/absolute/path/to/dir/','relative/path/']
Making Sphinx Use the Theme
---------------------------
Edit the ``conf.py`` file and make the following setting: ::
html_theme = 'ADCtheme'
Screen Shots
------------
.. image:: http://github.com/coordt/ADCtheme/raw/master/static/scrn1.png
.. image:: http://github.com/coordt/ADCtheme/raw/master/static/scrn2.png
To Do
-----
* Gotta get the javascript working so the Table of Contents is hide-able.
* Probably lots of css cleanup.
\ No newline at end of file
{% extends "basic/layout.html" %}
{%- block doctype -%}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{%- endblock %}
{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- block linktags %}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
{%- endif %}
{%- if hasdoc('genindex') %}
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
{%- endif %}
{%- if hasdoc('search') %}
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
{%- endif %}
{%- if hasdoc('copyright') %}
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
{%- endif %}
<link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
{%- if parents %}
<link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
{%- endif %}
{%- if next %}
<link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
{%- endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
{%- block header %}{% endblock %}
{%- block relbar1 %}
<div id="docstitle">
<p>{{docstitle}}</p>
</div>
<div id="header">
<div id="title"><h1>{{ title|striptags }}</h1></div>
<ul id="headerButtons">
<li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
<li id="page_buttons">
{%- for rellink in rellinks %}
<div class="headerButton"><a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}" {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a></div>
{%- endfor %}
</li>
</ul>
</div>
{% endblock %}
{%- block sidebar1 %}
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
<div id="sphinxsidebar">
<div class="sphinxsidebarwrapper">
{%- block sidebarlogo %}
{%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
</a></p>
{%- endif %}
{%- endblock %}
{%- block sidebartoc %}
<ul><li class="toctree-l1"><a href="{{ pathto(master_doc) }}">{{ _('Main Page') }}</a></li></ul>
{{ toctree() }}
{%- endblock %}
{%- block sidebarrel %}
{%- endblock %}
{%- block sidebarsourcelink %}
{%- if show_source and has_source and sourcename %}
<h3>{{ _('This Page') }}</h3>
<ul class="this-page-menu">
<li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
rel="nofollow">{{ _('Show Source') }}</a></li>
</ul>
{%- endif %}
{%- endblock %}
{%- if customsidebar %}
{% include customsidebar %}
{%- endif %}
{%- block sidebarsearch %}
{%- if pagename != "search" %}
<div id="searchbox" style="display: none">
{# <h3>{{ _('Quick search') }}</h3> #}
<form class="search" action="{{ pathto('search') }}" method="get">
<div class="search-wrapper">
<span class="search-left"></span>
<input class="prettysearch" type="text" name="q" size="18" />
<span class="search-right">&nbsp;</span>
</div>
<input type="submit" value="{{ _('Search') }}" class="searchbutton" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
{{ _('Enter search terms or a module, class or function name.') }}
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
{%- endif %}
{%- endblock %}
</div>
</div>
{%- endif %}{% endif %}
{% endblock %}
{%- block document %}
<div class="documentwrapper">
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
<div class="bodywrapper">
{%- endif %}{% endif %}
<div class="body">
{% block body %} {% endblock %}
</div>
{%- if not embedded %}{% if not theme_nosidebar|tobool %}
</div>
{%- endif %}{% endif %}
</div>
<div class="footer">
<p>{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- endif %}
{%- if show_sphinx %}
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
{%- endif %}
</p>
</div>
{%- endblock %}
{%- block sidebar2 %}{% endblock %}
{%- block relbar2 %}{% endblock %}
{%- block footer %}
<div id="breadcrumbs">
{%- for parent in parents %}
<a href="{{ parent.link|e }}" {{ accesskey("U") }}>{{ parent.title }}</a><img src="triangle_closed.png" alt="Right arrow">
{%- endfor %}
<a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>
</ul>
</div>
{%- endblock %}
This diff is collapsed.
[theme]
inherit = basic
stylesheet = adctheme.css
pygments_style = friendly
{%- extends "basic/layout.html" %}
{%- block extrahead %}
{{ super() }}
{% if theme_touch_icon %}
<link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, 1) }}" />
{% endif %}
<link media="only screen and (max-device-width: 480px)" href="{{
pathto('_static/small_flask.css', 1) }}" type= "text/css" rel="stylesheet" />
{% endblock %}
{%- block relbar2 %}{% endblock %}
{% block header %}
{{ super() }}
{% if pagename == 'index' %}
<div class=indexwrapper>
{% endif %}
{% endblock %}
{%- block footer %}
<div class="footer">
&copy; Copyright {{ copyright }}.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
</div>
{% if pagename == 'index' %}
</div>
{% endif %}
{%- endblock %}
<h3>Related Topics</h3>
<ul>
<li><a href="{{ pathto(master_doc) }}">Documentation overview</a><ul>
{%- for parent in parents %}
<li><a href="{{ parent.link|e }}">{{ parent.title }}</a><ul>
{%- endfor %}
{%- if prev %}
<li>Previous: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
}}">{{ prev.title }}</a></li>
{%- endif %}
{%- if next %}
<li>Next: <a href="{{ next.link|e }}" title="{{ _('next chapter')
}}">{{ next.title }}</a></li>
{%- endif %}
{%- for parent in parents %}
</ul></li>
{%- endfor %}
</ul></li>
</ul>
/*
* flasky.css_t
* ~~~~~~~~~~~~
*
* :copyright: Copyright 2010 by Armin Ronacher.
* :license: Flask Design License, see LICENSE for details.
*/
{% set page_width = '940px' %}
{% set sidebar_width = '220px' %}
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: 'Georgia', serif;
font-size: 17px;
background-color: white;
color: #000;
margin: 0;
padding: 0;
}
div.document {
width: {{ page_width }};
margin: 30px auto 0 auto;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 {{ sidebar_width }};
}
div.sphinxsidebar {
width: {{ sidebar_width }};
}
hr {
border: 1px solid #B1B4B6;
}