Merge branch 'release/0.3.0' into production

* release/0.3.0:
  update changelog, add release version
  adapt documentation to changed package structure
  move tasks from osusers to fileservertasks.tasks
  switch to gvacommon.celeryrouters.GvaRouter
  fix typo
  unify routers, add support for mysql and pgsql tasks
  define celery timezone, restrict celery content to json
This commit is contained in:
Jan Dittberner 2015-01-19 22:25:55 +01:00
commit 464a5ba47f
11 changed files with 49 additions and 55 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:`-` refactor osusers.tasks, move to fileservertasks.tasks
* :release:`0.2.0 <2014-12-27>` * :release:`0.2.0 <2014-12-27>`
* :support:`-` restrict permissions of mailbox base directories to be read only * :support:`-` restrict permissions of mailbox base directories to be read only
* :feature:`-` add new mailbox handling tasks * :feature:`-` add new mailbox handling tasks

View file

@ -16,67 +16,67 @@ The project module :py:mod:`gvafile`
.. automodule:: gvafile .. automodule:: gvafile
:py:mod:`gvafile.celery` :py:mod:`celery <gvafile.celery>`
------------------------ ---------------------------------
.. automodule:: gvafile.celery .. automodule:: gvafile.celery
:members: :members:
:py:mod:`gvafile.urls` :py:mod:`urls <gvafile.urls>`
---------------------- -----------------------------
.. automodule:: gvafile.urls .. automodule:: gvafile.urls
:py:mod:`gvafile.exceptions` :py:mod:`exceptions <gvafile.exceptions>`
---------------------------- -----------------------------------------
.. automodule:: gvafile.exceptions .. automodule:: gvafile.exceptions
:py:mod:`gvafile.wsgi` :py:mod:`wsgi <gvafile.wsgi>`
---------------------- -----------------------------
.. automodule:: gvafile.wsgi .. automodule:: gvafile.wsgi
:members: :members:
:py:mod:`gvafile.settings` :py:mod:`settings <gvafile.settings>`
-------------------------- -------------------------------------
.. automodule:: gvafile.settings .. automodule:: gvafile.settings
:py:mod:`gvafile.settings.base` :py:mod:`base <gvafile.settings.base>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: gvafile.settings.base .. automodule:: gvafile.settings.base
:members: :members:
:py:mod:`gvafile.settings.local` :py:mod:`local <gvafile.settings.local>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: gvafile.settings.local .. automodule:: gvafile.settings.local
:py:mod:`gvafile.settings.production` :py:mod:`production <gvafile.settings.production>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: gvafile.settings.production .. automodule:: gvafile.settings.production
:py:mod:`gvafile.settings.test` :py:mod:`test <gvafile.settings.test>`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: gvafile.settings.test .. automodule:: gvafile.settings.test
:py:mod:`osusers` app :py:mod:`filservertasks` app
===================== ============================
.. automodule:: osusers .. automodule:: fileservertasks
:py:mod:`osusers.tasks` :py:mod:`tasks <fileservertasks.tasks>`
----------------------- ---------------------------------------
.. automodule:: osusers.tasks .. automodule:: fileservertasks.tasks
:members: :members:
:undoc-members: :undoc-members:

View file

@ -55,16 +55,16 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'gvafile' project = u'gvafile'
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.0' 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.
@ -242,7 +242,7 @@ man_pages = [
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'gvafile', u'gvafile Documentation', ('index', 'gvafile', u'gvafile Documentation',
u'Jan Dittberner', 'gvafile', 'GNUViech admin filserver tools.', u'Jan Dittberner', 'gvafile', 'GNUViech admin fileserver tools.',
'Miscellaneous'), 'Miscellaneous'),
] ]

View file

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

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

@ -224,7 +224,7 @@ DJANGO_APPS = (
# Apps specific for this project go here. # Apps specific for this project go here.
LOCAL_APPS = ( LOCAL_APPS = (
'osusers', 'fileservertasks',
) )
# See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps # See: https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
@ -283,10 +283,11 @@ 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_ACCEPT_CONTENT = ['pickle', 'yaml', 'json'] CELERY_TIMEZONE = 'Europe/Berlin'
CELERY_ENABLE_UTC = True
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json' CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json'
########## END CELERY CONFIGURATION ########## END CELERY CONFIGURATION

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.
"""