Skip to content

Instantly share code, notes, and snippets.

@bkiu
Last active Aug 29, 2015
Embed
What would you like to do?

In tasks.py

from frappe.celery_app import celery_task, task_logger
...
@celery_task()                         
def import_data(site, data):           
    task_logger.warn("In import_data") 

In function that's receiving the POST request:

from mymodule import tasks
...
tasks.import_data.delay(frappe.local.site, data_string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment