from django.core.management.base import BaseCommand
from repomgmt.models import BuildNode, BuildRecord
import repomgmt.utils

class Command(BaseCommand):
    args = ''
    help = 'Processes the build queue'

    def handle(self, **options):
        if BuildRecord.pending_build_count() > 0:
            bn = BuildNode.start_new()
            br = BuildRecord.pick_build(bn)
            bn.prepare(br)
            bn.build(br)

from django.core.management.base import BaseCommand
from repomgmt.models import BuildNode, BuildRecord


class Command(BaseCommand):
    args = ''
    help = 'Processes the build queue'

    def handle(self, **options):
        if BuildRecord.pending_build_count() > 0:
            bn = BuildNode.start_new()
            br = BuildRecord.pick_build(bn)
            bn.prepare(br)
            bn.build(br)

Add tailing / to APT_REPO_BASE_URL
Add tailing / to APT_REPO_BASE_URL

  from django.core.management.base import BaseCommand
  from repomgmt.models import BuildNode, BuildRecord
- import repomgmt.utils
+ 
  
  class Command(BaseCommand):
      args = ''
      help = 'Processes the build queue'
  
      def handle(self, **options):
          if BuildRecord.pending_build_count() > 0:
              bn = BuildNode.start_new()
              br = BuildRecord.pick_build(bn)
              bn.prepare(br)
              bn.build(br)
  
Add tailing / to APT_REPO_BASE_URL
## Code Before:
from django.core.management.base import BaseCommand
from repomgmt.models import BuildNode, BuildRecord
import repomgmt.utils

class Command(BaseCommand):
    args = ''
    help = 'Processes the build queue'

    def handle(self, **options):
        if BuildRecord.pending_build_count() > 0:
            bn = BuildNode.start_new()
            br = BuildRecord.pick_build(bn)
            bn.prepare(br)
            bn.build(br)

## Instruction:
Add tailing / to APT_REPO_BASE_URL
## Code After:
from django.core.management.base import BaseCommand
from repomgmt.models import BuildNode, BuildRecord


class Command(BaseCommand):
    args = ''
    help = 'Processes the build queue'

    def handle(self, **options):
        if BuildRecord.pending_build_count() > 0:
            bn = BuildNode.start_new()
            br = BuildRecord.pick_build(bn)
            bn.prepare(br)
            bn.build(br)
