Skip to content

Loading…

Update logging #11

Closed
wants to merge 4 commits into from
Commits on Feb 1, 2013
  1. @yrik
Commits on Feb 4, 2013
  1. @yrik

    allow newer celery

    yrik committed
Commits on Mar 6, 2013
  1. @yrik

    Fix for non-ascii data

    yrik committed
  2. @yrik

    Set coding: utf-8

    yrik committed
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 2 deletions.
  1. +1 −0 queued_storage/backends.py
  2. +1 −0 queued_storage/fields.py
  3. +1 −0 queued_storage/signals.py
  4. +5 −1 queued_storage/tasks.py
  5. +1 −0 queued_storage/utils.py
  6. +1 −1 setup.py
View
1 queued_storage/backends.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
from django.core.cache import cache
from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import SimpleLazyObject
View
1 queued_storage/fields.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
from django.db.models.fields.files import FileField, FieldFile
View
1 queued_storage/signals.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
"""
django-queued-storage ships with a signal fired after a file was transfered
by the Transfer task. It provides the name of the file, the local and the
View
6 queued_storage/tasks.py
@@ -1,12 +1,17 @@
+# -*- coding: utf-8 -*-
from django.core.cache import cache
from celery.task import Task
+from celery.utils.log import get_task_logger
from queued_storage.conf import settings
from queued_storage.signals import file_transferred
from queued_storage.utils import import_attribute
+logger = get_task_logger(__name__)
+
+
class Transfer(Task):
"""
The default task. Transfers a file to a remote location.
@@ -108,7 +113,6 @@ def transfer(self, name, local, remote, **kwargs):
remote.save(name, local.open(name))
return True
except Exception, e:
- logger = self.get_logger(**kwargs)
logger.error("Unable to save '%s' to remote storage. "
"About to retry." % name)
logger.exception(e)
View
1 queued_storage/utils.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
View
2 setup.py
@@ -44,7 +44,7 @@ def find_version(*file_paths):
'Topic :: Utilities',
],
install_requires=[
- 'django-celery >= 2.3.3, < 3.0',
+ 'django-celery >= 2.3.3',
'django-appconf >= 0.4',
],
zip_safe=False,
Something went wrong with that request. Please try again.