-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nothing shown in django admin results, results only in flower #102
Comments
I confirm the issue. It shows me the results in Flower but not in django-celery-results. The fix was to add systemd exec command would look like this:
|
Hi, CELERY STUFFCELERY_BROKER_URL = 'redis://127.0.0.1:6379' INSTALLED_APPS = [ Table was migrated without problems. The celery task run and work correctly. But no entry in database table. I tested with local sqlite and mariadb. best regards, |
In my start script there is -E switch when I start celery worker try it:
ExecStart=/bin/sh -c '${CELERY_BIN} multi start ${CELERYD_NODES} \
-A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} \
--logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} -E
${CELERYD_OPTS}'
…------ Original Message ------
From: "Lars Reidelbach" <[email protected]>
To: "celery/django-celery-results"
<[email protected]>
Cc: "PaszaVonPomiot" <[email protected]>; "Comment"
<[email protected]>
Sent: 2019-09-26 14:01:52
Subject: Re: [celery/django-celery-results] Nothing shown in django
admin results, results only in flower (#102)
Hi,
I have the same problem, the Task Results in the table are missing. I am
not using flower. Only django, django-celery-results and database (try
sqlite and mariadb).
CELERY STUFF
CELERY_BROKER_URL = 'redis://127.0.0.1:6379'
CELERY_RESULT_BACKEND = 'django-db'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'Europe/Berlin'
DJANGO_CELERY_RESULTS_TASK_ID_MAX_LENGTH=191
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'modules',
'guardian',
'rest_framework',
'rest_framework.authtoken',
'django_celery_results',
'rangefilter',
'import_export',
]
Table was migrated without problems. The celery task run and work
correctly. But no entry in database table. I tested with local sqlite
and mariadb.
So now I read the switch -E not sure what you mean with this. I only
start celery worker in my project.
best regards,
Lars
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#102?email_source=notifications&email_token=ABKNRBQKGLWUVYG6VAIMBS3QLSQDBA5CNFSM4HZOIWQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7VKJLI#issuecomment-535471277>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABKNRBRBQBNNRTJTSTVLATTQLSQDBANCNFSM4HZOIWQQ>.
|
I tested it on some systems (ubuntu 19.04, RHEL (GNU/Linux 3.10.0-1062.1.2.el7.x86_64 Linux) ) , with different databases (sqlite, mariadb) but always same problem. Celery result is not written to database. the switch -E is not helping me. |
I don't have any more ideas, sorry.
…------ Original Message ------
From: "Lars Reidelbach" <[email protected]>
To: "celery/django-celery-results"
<[email protected]>
Cc: "PaszaVonPomiot" <[email protected]>; "Comment"
<[email protected]>
Sent: 2019-10-18 17:31:26
Subject: Re: [celery/django-celery-results] Nothing shown in django
admin results, results only in flower (#102)
I tested it on some systems (ubuntu 19.04, RHEL (GNU/Linux
3.10.0-1062.1.2.el7.x86_64 Linux) ) , with different databases (sqlite,
mariadb) but always same problem. Celery result is not written to
database. the switch -E is not helping me.
Some tips how I can debug further ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#102?email_source=notifications&email_token=ABKNRBQEQP2AG4VZ4SQDDSTQPHJE5A5CNFSM4HZOIWQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBU3MAQ#issuecomment-543798786>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKNRBR4MO6WIH2WFW6KWHTQPHJE5ANCNFSM4HZOIWQQ>.
|
@larsrei - not sure how you were running Celery, but I had the same problem when testing, it was do to not running Celery worker - I was only running the scheduler. First run: |
Hi @kowalej, |
Put the following in settings.py and django-celery-results should work with one TaskResult per email: CELERY_EMAIL_TASK_CONFIG = {'ignore_result': False} It took me a long time to figure this out even though it is (abstractly) mentioned in the README for django-celery-email. |
Hello everyone, I had a similar scenario with an app deployed on kubernetes with this problem as as well, in my case I am using celery with redis as the broker. My problem was in my configuration ( almost always is 😄 ) were I used redis in both the broken and result DB. Below is my celery config from This is the old not working config.
This is the working config.
|
based on this I think we should close this issue |
is this contributed to celery docs? |
I haven't added anything to docs. I think someone more knowledgable in celery should review this before adding anything to docs. |
I can also confirm that adding -E enabled |
For me it also turned out that adding the -E flag enabled the results to be included in the backend database. |
What about the CELERY_CACHE_BACKEND setting is not that supposed to be used when using REDIS as CELERY_BROKER_URL? |
can you please elaborate? |
Im sorry, I am a total noob with Linux systems and I am using Bash on windows. I tried putting thing into my venv and got back "bash: -c: command not found", "which bash" and got a "/usr/bin/bash" and change those variables to match that and I am still getting this issue. It doesn't work outside of Venv either. |
Yeah, the main point that |
Hello there,
I just gave this a try and I can't figure out why I get no results in the admin.
Here's what I tried:
django-celery-email
, add to installed apps and setsettings.EMAIL_BACKEND
django-celery-results
, add to installed apps and setup as described in the documentationHere are exact commands to reproduce the issue:
Email is successfully sent and does go through the queue using celery. Open a shell and verify the data:
It's empty, that's the problem 😢
The result is shown in flower correctly:
The email is definitely sent correctly too
The result backend doesn't seem to be used correctly or there's something I'm missing here:
Related settings
The text was updated successfully, but these errors were encountered: