Skip to content

Commit

Permalink
Import newer CDRs first
Browse files Browse the repository at this point in the history
  • Loading branch information
areski committed Oct 14, 2015
1 parent 9840de1 commit a796a5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cdr_stats/cdr/cdr_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def import_cdr(shell=False, logger=False):

# Each time the task is running we will only take CDR_IMPORT_LIMIT records to import
# This define the max speed of import, this limit could be changed
new_CDRs = CDRImport.objects.using('import_cdr').filter(imported=False)[:settings.CDR_IMPORT_LIMIT]
new_CDRs = CDRImport.objects.using('import_cdr')\
.filter(imported=False)\
.order_by('-id')[:settings.CDR_IMPORT_LIMIT]

(list_newcdr, list_cdrid) = ([], [])
for call in new_CDRs:
Expand Down

0 comments on commit a796a5a

Please sign in to comment.