forked from erp-dev/erp
feat: haobuye
This commit is contained in:
14
api_v1/management/commands/sync_external_printing_records.py
Normal file
14
api_v1/management/commands/sync_external_printing_records.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from api_v1.tasks import sync_external_printing_records
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = '从外部 records 接口同步印染订单/任务'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--limit', type=int, default=100)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
payload = sync_external_printing_records.run(limit=options['limit'])
|
||||
self.stdout.write(self.style.SUCCESS(str(payload)))
|
||||
Reference in New Issue
Block a user