Skip to content

Commit

Permalink
linting some blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Koed00 committed Jul 10, 2015
1 parent 90d30e1 commit e590628
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion django_q/admin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.contrib import admin

from django.utils.translation import ugettext_lazy as _

from .tasks import async
Expand Down
1 change: 1 addition & 0 deletions django_q/apps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.apps import AppConfig

from .conf import Conf


Expand Down
5 changes: 2 additions & 3 deletions django_q/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
from django_q.monitor import Status, Stat




class Cluster(object):
def __init__(self, list_key=Conf.Q_LIST):
try:
Expand Down Expand Up @@ -450,7 +448,8 @@ def scheduler(list_key=Conf.Q_LIST):
kwargs['list_key'] = list_key
s.task = tasks.async(s.func, *args, **kwargs)
if not s.task:
logger.error(_('{} failed to create a task from schedule {} [{}]').format(current_process().name, s.id), s.func)
logger.error(_('{} failed to create a task from schedule {} [{}]').format(current_process().name, s.id),
s.func)
else:
logger.info(_('{} created a task from schedule {} [{}]').format(current_process().name, s.id, s.func))
s.save()
2 changes: 2 additions & 0 deletions django_q/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class Conf(object):
STOPPED = _('Stopped')
STOPPING = _('Stopping')


# logger
logger = logging.getLogger('django-q')

Expand All @@ -90,5 +91,6 @@ def get_redis_client():
return django_redis.get_redis_connection(Conf.DJANGO_REDIS)
return redis.StrictRedis(**Conf.REDIS)


# redis client
redis_client = get_redis_client()
4 changes: 3 additions & 1 deletion django_q/signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import pickle

from django.core import signing

from django_q.conf import Conf

BadSignature = signing.BadSignature


class SignedPackage(object):
"""
Wraps Django's signing module with custom Pickle serializer
Expand Down Expand Up @@ -41,4 +43,4 @@ def dumps(obj):

@staticmethod
def loads(data):
return pickle.loads(data)
return pickle.loads(data)
1 change: 0 additions & 1 deletion django_q/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,3 @@ def _sync(task_id, pack):
result_queue.put('STOP')
cluster.monitor(result_queue)
return task_id

0 comments on commit e590628

Please sign in to comment.