Skip to content

Commit

Permalink
PyLint code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
audaciouscode committed Aug 16, 2017
1 parent d755c47 commit fa5974a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions management/commands/pdk_process_bundles.py
Expand Up @@ -30,7 +30,7 @@ def add_arguments(self, parser):
@handle_lock
def handle(self, *args, **options):
to_delete = []

supports_json = install_supports_jsonfield()
default_tz = timezone.get_default_timezone()

Expand Down Expand Up @@ -70,4 +70,4 @@ def handle(self, *args, **options):
for bundle in to_delete:
bundle.delete()

logging.debug("%d unprocessed payloads remaining.", DataBundle.objects.filter(processed=False).count())
logging.debug("%d unprocessed payloads remaining.", DataBundle.objects.filter(processed=False).count())
2 changes: 1 addition & 1 deletion models.py
Expand Up @@ -208,7 +208,7 @@ def update_performance_metadata(self):
generator['last_recorded'] = calendar.timegm(last_recorded.recorded.timetuple())
generator['first_created'] = calendar.timegm(first_point.created.timetuple())
generator['last_created'] = calendar.timegm(last_point.created.timetuple())

duration = (last_point.created - first_point.created).total_seconds()

if generator['points_count'] > 1 and duration > 0:
Expand Down
5 changes: 0 additions & 5 deletions views.py
Expand Up @@ -6,7 +6,6 @@
import os

from django.conf import settings
from django.core.management import call_command
from django.http import HttpResponse, HttpResponseNotAllowed, JsonResponse, HttpResponseNotFound, \
FileResponse, UnreadablePostError
from django.shortcuts import render
Expand Down Expand Up @@ -113,8 +112,6 @@ def add_data_bundle(request): # pylint: disable=too-many-statements

bundle.save()

# call_command('pdk_process_bundles')

return response

elif request.method == 'POST':
Expand Down Expand Up @@ -156,8 +153,6 @@ def add_data_bundle(request): # pylint: disable=too-many-statements
data_file.content_file.save(value.name, value)
data_file.save()

# call_command('pdk_process_bundles')

return response
elif request.method == 'OPTIONS':
response = HttpResponse('', content_type='text/plain', status=200)
Expand Down

0 comments on commit fa5974a

Please sign in to comment.