# coding=utf-8
from django.core.management import BaseCommand

from api.models import Service, const_strings
from rpc.cache import ViewRecord


class Command(BaseCommand):
    def handle(self, *args, **options):
        services = Service.objects.all()
        for s in services:
            ViewRecord(const_strings.SERVICE)[s.id] = s.sell_amount