Do yo know how to debug the line erpnext.tasks.send_newsletter.delay(frappe.local.site, self.name, event="bulk_long"), I can confirm that 'send_newsletter 'in tasks.py never run and this line return ‘false’ in result.failed()
No errors and no success in worker.error.log, worker.log, workerbeat.error.log and workerbeat.log
I research more:
I delete (FUSHALL) all keys in redis server and I restart bench, and I have noticed that the keys ‘celery-task-meta…’ continues to increase, I guess that this is normal (nobody use erpnext meanwhile)
When I send newsletter a new key in redis appears ‘longjobs@erp.citysound.net’ (erp.citysound.net is one of my sites where I send the newsletter), I decode the body and this is (‘Test6’ is the name/subject of newsletter):
I thought that this issue was only in my deploy but I test a full installation in a digitalocean droplet Ubuntu 14.04 64bits(like my deploy) and after run install bench script, configure outgoing acount email, test send ok with ‘send test’ from newsletter then I send the newsletter to a list with subcribers and nothing happens.
Is ‘send newsletter’ the only async task in frappe/erpnext?
@rmehta, @pdvyas I’ve gotten it to work!, but passing empty string to “event” parameter instead of “bulk_long” : erpnext.tasks.send_newsletter.delay(frappe.local.site, self.name, event="")
The problem is in this loop: https://github.com/frappe/frappe/blob/master/frappe/tasks.py#L44
The only worker in this loop no start with LONGJOBS_PREFIX (neither with ASYNC_TASKS_PREFIX).
Supervisor only run one worker and his name is by default celery@hostname, this is the only worker that return the line 44.
Following the flow of the code result that only the queues with the exact same name that sites are dispatched, only short jobs, no long jobs (neither async tasks).
This I resolve adding one worker more (other will be necesary for async tasks) in supervisor.conf: