Merge branch 'release/0.3.0' into production

* release/0.3.0:
  update copyright years, add release version
  add changelog entry for tasks refactoring
  adapt code documentation to changed module structure
  move osusers to ldaptasks
  switch to gvacommon.celeryrouters.GvaRouter
  unify routers, add support for mysql and pgsql tasks
This commit is contained in:
Jan Dittberner 2015-01-19 22:17:15 +01:00
commit 50d9dfab33
11 changed files with 48 additions and 56 deletions

View file

@ -1,4 +1,4 @@
Copyright (c) 2014 Jan Dittberner Copyright (c) 2014, 2015 Jan Dittberner
Permission is hereby granted, free of charge, to any person Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation obtaining a copy of this software and associated documentation

View file

@ -1,6 +1,9 @@
Changelog Changelog
========= =========
* :release:`0.3.0 <2015-01-19>`
* :support:`-` move tasks from osusers to ldaptasks.tasks
* :release:`0.2.0 <2014-12-29>` * :release:`0.2.0 <2014-12-29>`
* :feature:`-` add task :py:func:`osusers.tasks.delete_ldap_group` * :feature:`-` add task :py:func:`osusers.tasks.delete_ldap_group`
* :support:`-` use celery routers from gvacommon * :support:`-` use celery routers from gvacommon

View file

@ -16,82 +16,82 @@ The project module :py:mod:`gvaldap`
.. automodule:: gvaldap .. automodule:: gvaldap
:py:mod:`gvaldap.celery` :py:mod:`celery <gvaldap.celery>`
------------------------ ---------------------------------
.. automodule:: gvaldap.celery .. automodule:: gvaldap.celery
:members: :members:
:py:mod:`gvaldap.urls` :py:mod:`urls <gvaldap.urls>`
---------------------- -----------------------------
.. automodule:: gvaldap.urls .. automodule:: gvaldap.urls
:py:mod:`gvaldap.wsgi` :py:mod:`wsgi <gvaldap.wsgi>`
---------------------- -----------------------------
.. automodule:: gvaldap.wsgi .. automodule:: gvaldap.wsgi
:members: :members:
:py:mod:`gvaldap.settings` :py:mod:`settings <gvaldap.settings>`
-------------------------- -------------------------------------
.. automodule:: gvaldap.settings .. automodule:: gvaldap.settings
:py:mod:`gvaldap.settings.base` :py:mod:`base <gvaldap.settings.base>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: gvaldap.settings.base .. automodule:: gvaldap.settings.base
:members: :members:
:py:mod:`gvaldap.settings.local` :py:mod:`local <gvaldap.settings.local>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: gvaldap.settings.local .. automodule:: gvaldap.settings.local
:py:mod:`gvaldap.settings.production` :py:mod:`production <gvaldap.settings.production>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: gvaldap.settings.production .. automodule:: gvaldap.settings.production
:py:mod:`gvaldap.settings.test` :py:mod:`test <gvaldap.settings.test>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: gvaldap.settings.test .. automodule:: gvaldap.settings.test
:py:mod:`ldapentities` app :py:mod:`ldapentities` app
========================== ==========================
.. automodule:: ldapentities .. automodule:: ldapentities
:py:mod:`ldapenties.admin` :py:mod:`admin <ldapenties.admin>`
-------------------------- ----------------------------------
.. automodule:: ldapentities.admin .. automodule:: ldapentities.admin
:members: :members:
:py:mod:`ldapenties.models` :py:mod:`models <ldapenties.models>`
--------------------------- ------------------------------------
.. automodule:: ldapentities.models .. automodule:: ldapentities.models
:members: :members:
:py:mod:`osusers` app :py:mod:`ldaptasks` app
===================== =======================
.. automodule:: osusers .. automodule:: ldaptasks
:py:mod:`osusers.tasks`
-----------------------
.. automodule:: osusers.tasks :py:mod:`tasks <ldaptasks.tasks>`
---------------------------------
.. automodule:: ldaptasks.tasks
:members: :members:
:undoc-members: :undoc-members:

View file

@ -53,16 +53,16 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'gvaldap' project = u'gvaldap'
copyright = u'2014, Jan Dittberner' copyright = u'2014, 2015 Jan Dittberner'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.2' version = '0.3'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.2.0' release = '0.3.0'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.

View file

@ -1,2 +1,3 @@
.*.swp .*.swp
*.pyc *.pyc
.ropeproject/

View file

@ -2,23 +2,14 @@
from __future__ import unicode_literals from __future__ import unicode_literals
class LdapRouter(object): class GvaRouter(object):
def route_for_task(self, task, args=None, kwargs=None): def route_for_task(self, task, args=None, kwargs=None):
if 'ldap' in task: for route in ['ldap', 'file', 'mysql', 'pgsql']:
return {'exchange': 'ldap', if route in task:
return {
'exchange': route,
'exchange_type': 'direct', 'exchange_type': 'direct',
'queue': 'ldap'} 'queue': route,
}
return None return None
class FileRouter(object):
def route_for_task(self, task, args=None, kwargs=None):
if 'file' in task:
return {'exchange': 'file',
'exchange_type': 'direct',
'queue': 'file'}
return None

View file

@ -232,7 +232,7 @@ DJANGO_APPS = (
# Apps specific for this project go here. # Apps specific for this project go here.
LOCAL_APPS = ( LOCAL_APPS = (
'ldapentities', 'ldapentities',
'osusers', 'ldaptasks',
) )
# See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
@ -291,8 +291,7 @@ CELERY_RESULT_BACKEND = 'amqp'
CELERY_RESULT_PERSISTENT = True CELERY_RESULT_PERSISTENT = True
CELERY_TASK_RESULT_EXPIRES = None CELERY_TASK_RESULT_EXPIRES = None
CELERY_ROUTES = ( CELERY_ROUTES = (
'gvacommon.celeryrouters.LdapRouter', 'gvacommon.celeryrouters.GvaRouter',
'gvacommon.celeryrouters.FileRouter',
) )
CELERY_TIMEZONE = 'Europe/Berlin' CELERY_TIMEZONE = 'Europe/Berlin'
CELERY_ENABLE_UTC = True CELERY_ENABLE_UTC = True

View file

@ -0,0 +1,4 @@
"""
This module contains :py:mod:`ldaptasks.tasks`.
"""

View file

@ -1,3 +0,0 @@
"""
This module contains :py:mod:`osusers.tasks`.
"""

View file

@ -1,3 +0,0 @@
"""
Empty models module required for Django to accept this as an app.
"""