create an object instance and save using shared_task

Viewed 27

Hi guys im looking to create a scheduled import of an object list for each morning in Django I can see that celery is triggering the process but in the admin console i am getting no entries could anyone please advise

from celery import shared_task
from .models import Customer

import pandas as pd
import logging


@shared_task
def importCustomers():
        cust = Customer.objects.create(name = "john Smith",user ='lennon@thebeatles.com')
        cust.save()
        return "we Won"
0 Answers
Related