From d9aa63f8ca24caf2308506903a935f322f42be1f Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 23 Jan 2012 20:00:39 -0400 Subject: [PATCH] Remove Sentry and celery from Mayan EDMS --- apps/job_processor/api.py | 13 +------------ apps/job_processor/conf/settings.py | 12 ------------ apps/ocr/views.py | 1 - contrib/supervisor/mayan-celery.conf | 23 ----------------------- contrib/supervisor/mayan-celerybeat.conf | 19 ------------------- docs/credits.rst | 8 -------- docs/requirements.rst | 6 ------ docs/settings.rst | 11 ----------- requirements/development.txt | 3 --- requirements/production.txt | 3 --- settings.py | 18 ------------------ urls.py | 1 - 12 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 apps/job_processor/conf/settings.py delete mode 100644 contrib/supervisor/mayan-celery.conf delete mode 100644 contrib/supervisor/mayan-celerybeat.conf diff --git a/apps/job_processor/api.py b/apps/job_processor/api.py index eee19321b1..781edbe5bc 100644 --- a/apps/job_processor/api.py +++ b/apps/job_processor/api.py @@ -1,16 +1,5 @@ -from celery.decorators import task, periodic_task -from celery.task.control import inspect - from job_processor.conf.settings import BACKEND -@task -def celery_task(func, *args, **kwargs): - return func(*args, **kwargs) - - def process_job(func, *args, **kwargs): - if BACKEND == 'celery': - return celery_task.delay(func, *args, **kwargs) - elif BACKEND is None: - return func(*args, **kwargs) + return func(*args, **kwargs) diff --git a/apps/job_processor/conf/settings.py b/apps/job_processor/conf/settings.py deleted file mode 100644 index 0d3b2fe9ea..0000000000 --- a/apps/job_processor/conf/settings.py +++ /dev/null @@ -1,12 +0,0 @@ -"""Configuration options for the job_processing app""" -from django.utils.translation import ugettext_lazy as _ - -from smart_settings.api import register_settings - -register_settings( - namespace=u'job_processor', - module=u'job_processor.conf.settings', - settings=[ - {'name': u'BACKEND', 'global_name': u'JOB_PROCESSING_BACKEND', 'default': None, 'description': _('Specified which job processing library to use, option are: None and celery.')}, - ] -) diff --git a/apps/ocr/views.py b/apps/ocr/views.py index 52e0fc9eb4..7083fb817c 100644 --- a/apps/ocr/views.py +++ b/apps/ocr/views.py @@ -11,7 +11,6 @@ from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied -from celery.task.control import inspect from permissions.models import Permission from documents.models import Document from documents.widgets import document_link, document_thumbnail diff --git a/contrib/supervisor/mayan-celery.conf b/contrib/supervisor/mayan-celery.conf deleted file mode 100644 index efcfd35927..0000000000 --- a/contrib/supervisor/mayan-celery.conf +++ /dev/null @@ -1,23 +0,0 @@ -; ======================================= -; celeryd supervisor example for Django -; ======================================= - -[program:celery] -command=/usr/share/mayan/bin/python /usr/share/mayan/mayan/manage.py celeryd --loglevel=INFO -directory=/usr/share/mayan/mayan -user=nobody -numprocs=1 -stdout_logfile=/var/log/mayan-celeryd.log -stderr_logfile=/var/log/mayan-celeryd.log -autostart=true -autorestart=true -startsecs=10 - -; Need to wait for currently executing tasks to finish at shutdown. -; Increase this if you have very long running tasks. -stopwaitsecs = 600 - -; if rabbitmq is supervised, set its priority higher -; so it starts first -priority=998 - diff --git a/contrib/supervisor/mayan-celerybeat.conf b/contrib/supervisor/mayan-celerybeat.conf deleted file mode 100644 index 7a37e9437f..0000000000 --- a/contrib/supervisor/mayan-celerybeat.conf +++ /dev/null @@ -1,19 +0,0 @@ -; ========================================== -; celerybeat supervisor example for Django -; ========================================== - -[program:celerybeat] -command=/usr/share/mayan/bin/python /usr/share/mayan/mayan/manage.py celerybeat --schedule=/var/lib/celery/celerybeat-schedule --loglevel=INFO -directory=/usr/share/mayan/mayan -user=nobody -numprocs=1 -stdout_logfile=/var/log/mayan-celerybeat.log -stderr_logfile=/var/log/mayan-celerybeat.log -autostart=true -autorestart=true -startsecs=10 - -; if rabbitmq is supervised, set its priority higher -; so it starts first -priority=999 - diff --git a/docs/credits.rst b/docs/credits.rst index e0b3e815d6..e7d8e4a3a9 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -75,14 +75,6 @@ Credits * Jens Gulden 2005-2007 - unpaper@jensgulden.de. * http://unpaper.berlios.de/ -* celery - Celery is an open source asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well. - * Copyright 2009-2011, Ask Solem & contributors - * http://ask.github.com/celery/getting-started/introduction.html - -* django-celery - django-celery provides Celery integration for Django - * Copyright Ask Solem & contributors - * http://github.com/ask/django-celery/ - * favicon * http://www.iconfinder.com/icondetails/21581/24/draw_pyramid_icon * Gnome Project diff --git a/docs/requirements.rst b/docs/requirements.rst index 665b9ba641..4b4cf9b00d 100644 --- a/docs/requirements.rst +++ b/docs/requirements.rst @@ -28,12 +28,6 @@ Executables: Optional requirements ===================== -To enable distributed OCR support ---------------------------------- - -* ``celery`` - asynchronous task queue/job queue based on distributed message passing -* ``django-celery`` - celery integration for Django - To store documents in a GridFS database --------------------------------------- diff --git a/docs/settings.rst b/docs/settings.rst index d27a0bb0ac..d39e9ca68a 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -179,17 +179,6 @@ Storage Default: ``document_storage`` - -Job processor -------------- - -.. data:: JOB_PROCESSING_BACKEND - - Default: ``None`` - - - Specifies which job processing library to use, option are: None and celery. - Document indexing ----------------- diff --git a/requirements/development.txt b/requirements/development.txt index 7cb6556ead..57f5c5272f 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -4,9 +4,6 @@ django-extensions==0.7.1 django-pagination==1.0.7 django-rosetta==0.6.2 wsgiref==0.1.2 -celery==2.2.2 -django-celery==2.2.2 -django-sentry==1.6.0 django-taggit==0.9.3 -e git://github.com/django-mptt/django-mptt.git@0af02a95877041b2fd6d458bd95413dc1666c321#egg=django-mptt -e git://github.com/ahupp/python-magic.git@a75cf0a4a7790eb106155c947af9612f15693b6e#egg=python-magic diff --git a/requirements/production.txt b/requirements/production.txt index cc3232892b..f8408ec634 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -1,9 +1,6 @@ Django==1.3.1 django-pagination==1.0.7 wsgiref==0.1.2 -celery==2.2.2 -django-celery==2.2.2 -django-sentry==1.6.0 django-taggit==0.9.3 -e git://github.com/django-mptt/django-mptt.git@0af02a95877041b2fd6d458bd95413dc1666c321#egg=django-mptt -e git://github.com/ahupp/python-magic.git@a75cf0a4a7790eb106155c947af9612f15693b6e#egg=python-magic diff --git a/settings.py b/settings.py index 1944232ed5..08221cb2fd 100644 --- a/settings.py +++ b/settings.py @@ -18,7 +18,6 @@ DEVELOPMENT = False TEMPLATE_DEBUG = False ADMINS = () -SENTRY_ADMINS = ('root@localhost',) MANAGERS = ADMINS DATABASES = { @@ -141,12 +140,6 @@ INSTALLED_APPS = ( 'filetransfers', 'acls', 'converter', - 'djcelery', - 'indexer', - 'paging', - 'sentry', - 'sentry.client', - 'sentry.client.celery', 'storage', 'folders', 'document_comments', @@ -278,18 +271,7 @@ COMPRESS_ENABLED=False #------------ django-sendfile -------------- # Change to xsendfile for apache if x-sendfile is enabled SENDFILE_BACKEND = 'sendfile.backends.simple' -#----------- django-celery -------------- -import djcelery -djcelery.setup_loader() -BROKER_HOST = "localhost" -BROKER_PORT = 5672 -BROKER_USER = "guest" -BROKER_PASSWORD = "guest" -BROKER_VHOST = "/" -CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler' #======== End of user configuration options ======= -#--------- Celery ------------------ -CELERY_DISABLE_RATE_LIMITS = True #--------- Web theme --------------- WEB_THEME_ENABLE_SCROLL_JS = False #--------- Django ------------------- diff --git a/urls.py b/urls.py index 4f88bbff7d..c125b3676d 100644 --- a/urls.py +++ b/urls.py @@ -15,7 +15,6 @@ urlpatterns = patterns('', (r'^tags/', include('tags.urls')), (r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^admin/', include(admin.site.urls)), - (r'^sentry/', include('sentry.urls')), (r'^comments/', include('document_comments.urls')), (r'^user_management/', include('user_management.urls')), (r'^settings/', include('smart_settings.urls')),