# Image not showing after adding ST_HUEY_SCHEDULE

O
ojophilip
Ojo Philip Odeniyi
• 1
• 2 Jan '21

I noticed that I'd not been receiving email notification and so I decided to go through the documentation and it states that I needed to add ST_HUEY_SCHEDULE. After adding this, images on the site are no longer displaying. I'd tried to solve the issue but all to no avail.

My code is {'full_search_index_update': {'hour': '*/24', 'minute': '0'}, 'notify_immediately': {'minute': '0'}}

Here is the URL MedsJoin

Kindly help

nitely
Esteban C Borsani
• 5
• 2 Jan '21

There is no notify_immediately periodic task. There is a task for sending weekly notifications. The task for sending them immediately is not periodic, obviously. If you're suddenly no longer receiving emails, it's a lot more likely an issue with your email server (SMTP, or whatever, maybe you exceeded some quote, or the service is down?). You should check the logs, and check the task manager is running, though.

Tasks are not related to comment images in any way, nor they modify user comments.

I can see some images in your post, some are broken, but I cannot tell why.

O
ojophilip
Ojo Philip Odeniyi
• 2
• 3 Jan '21

@nitely said:
There is no notify_immediately periodic task. There is a task for sending weekly notifications. The task for sending them immediately is not periodic, obviously. If you're suddenly no longer receiving emails, it's a lot more likely an issue with your email server (SMTP, or whatever, maybe you exceeded some quote, or the service is down?). You should check the logs, and check the task manager is running, though.

So if there is no notify_immediately, what do you suggest that I include for those who choose to receive email notification immediately or should I leave it blank? Which is what I did before. Also, I have never received any email notification. I need help with this

Tasks are not related to comment images in any way, nor they modify user comments.

Oh! Ok

I can see some images in your post, some are broken, but I cannot tell why.

Thanks for reply

O
ojophilip
Ojo Philip Odeniyi
• 29 Jan '21

Thanks, I solved the image issue but the notification is not been sent still. I make use of send grid SMTP and this works fine with others things like sign up, contact and application form etc

O
ojophilip
Ojo Philip Odeniyi
• 29 Jan '21

I will be glad if you can tell me what I can do

nitely
Esteban C Borsani
• 1
• 29 Jan '21

I've no idea. It's related to your setup.

Notifications work fine here, in fact I received one for your comment.

If the Spirit user activation email (UAE for short) is sent, but not the notifications, then it must be related to the task manager. When the task manager is not configured (ex: ST_TASK_MANAGER = None), the UAE is sent, but not the notifications, so that must be the issue.

Don't ask me how to configure the task manager or how to make sure it starts after reboot, we have been through this. Read my old replies.

My only advice is make sure you are using the settings you think you are using when starting the web server and the task manager. If you are in doubt then add some logging to the settings (like logger.error('not an error just a log')), or ask someone you trust and can debug the issue for you.

O
ojophilip
Ojo Philip Odeniyi
• 29 Jan '21

I received your comment too.

I use another authentication method not that of spirit and the ST_TASK_MANAGER is set to HUEY

The task manager is actually working fine, I know this because the search feature is working fine.

I'm confused. I'm sorry for bothering you

nitely
Esteban C Borsani
• 2
• 30 Jan '21

NP. So, I killed my exim process (the email server I used), then tried so create some notification. This what got logged out:

ERROR 2021-01-30 00:09:07,804 tasks 13154 -1265632448 [Errno 111] Connection refused
[some traceback]


So, check your logs, and see if there is an error when sending the email. You can change the settings to log into a file, or start the task manager manually to see the output there, or check the journal. If there is no error, then check whether sendgrid provide some kind of log.

But the issue is very odd, it should just work.

O
ojophilip
Ojo Philip Odeniyi
• 4
• 7 Apr '21

@nitely said:
NP. So, I killed my exim process (the email server I used), then tried so create some notification. This what got logged out:

ERROR 2021-01-30 00:09:07,804 tasks 13154 -1265632448 [Errno 111] Connection refused
[some traceback]


So, check your logs, and see if there is an error when sending the email. You can change the settings to log into a file, or start the task manager manually to see the output there, or check the journal. If there is no error, then check whether sendgrid provide some kind of log.

But the issue is very odd, it should just work.

Thanks for your replies,

Here is what my error look like:

ERROR 2021-04-07 11:46:05,722 consumer 1946 140657584813824 Error reading from queue
Traceback (most recent call last):
File "/home/site/appdir/env/lib/python3.8/site-packages/huey/consumer.py", line 109, in loop
task = self.huey.dequeue()
File "/home/site/appdir/env/lib/python3.8/site-packages/huey/api.py", line 302, in dequeue
return self.deserialize_task(data)
File "/home/site/appdir/env/lib/python3.8/site-packages/huey/api.py", line 278, in deserialize_task
return self._registry.create_task(message)
File "/home/site/appdir/env/lib/python3.8/site-packages/huey/registry.py", line 83, in create_task
TaskClass = self.string_to_task(message.name)
File "/home/site/appdir/env/lib/python3.8/site-packages/huey/registry.py", line 44, in string_to_task
raise HueyException('%s not found in TaskRegistry' % task_str)
huey.exceptions.HueyException: spirit.core.tasks.notify_reply not found in TaskRegistry


I'll appreciate if you can be of help

nitely
Esteban C Borsani
• 4
• 9 Apr '21

How are you running the task manager? are you running the python manage.py run_huey command?

The error means the task manager cannot find the tasks.py file. I'm not sure why. Running the web server and the task manager with different DJANGO_SETTINGS_MODULE values (or --settings=... parameters) is one possibility.

O
ojophilip
Ojo Philip Odeniyi
• 9 Apr '21

@nitely said:
How are you running the task manager? are you running the python manage.py run_huey command?

Yes I'm running this command using supervisord. And has been working for search function since then.

The error means the task manager cannot find the tasks.py file. I'm not sure why. Running the web server and the task manager with different DJANGO_SETTINGS_MODULE values (or --settings=... parameters) is one possibility.

Can this be bcos of the logging parameters in my settings.py as I didn't update it when I updated the project recently? I will get my DJANGO_SETTINGS_MODULE across to you

nitely
Esteban C Borsani
• 1
• 10 Apr '21

@ojophilip said:

@nitely said:
How are you running the task manager? are you running the python manage.py run_huey command?

Yes I'm running this command using supervisord. And has been working for search function since then.

Is there a huey.exceptions.HueyException: spirit.core.tasks.search_index_update not found in TaskRegistry error in your log file?

Is there a new spirit.core.tasks.notify_reply error every time you make a comment?

The error means the task manager cannot find the tasks.py file. I'm not sure why. Running the web server and the task manager with different DJANGO_SETTINGS_MODULE values (or --settings=... parameters) is one possibility.

Can this be bcos of the logging parameters in my settings.py as I didn't update it when I updated the project recently? I will get my DJANGO_SETTINGS_MODULE across to you

I'm not sure. You should be seeing errors mentioning search_index_update and notify_reply. If the task manager can find the search function, but not the notify function, then that'd be very odd. Making a comment should generate both errors.

Also, if you mention some user, you should see an error related to notify_mention.

nitely
Esteban C Borsani
• 10 Apr '21

If the task manager can find the search function, but not the notify function, then that'd be very odd.

Actually, I'd have an explanation for that. It would be possible if you are running the Task manager using an older Spirit version, and the web app with a newer Spirit version. The task manager will find the search task, but not the notify task (because it was added later). How could this be? there are at least two ways: 1. you have upgraded your Spirit version and restarted the web app, but never restarted the task manager (so the task manager is running the old Spirit version); and 2. you have two Spirit versions installed (ie: one in a venv and another in the global python, or maybe two venvs) and you start the task manager with one and the web app with the other.

Send me your supervisor.conf file as well.

O
ojophilip
Ojo Philip Odeniyi
• 10 Apr '21

@nitely, thanks every single time you have had to help me🙇.

I followed the explanation you gave before the recent one and found out that I was running the supervisord using globally installed apps.

I compared my gunicorn configuration with that and had to change that of supervisord. After then I stopped supervisord and restarted it. It's now delivering email perfectly.

I guessed both of your explanations above are equally correct as I've never restarted the supervisord since configured it, thus might have led to this problem.

Thanks a bunch😊

nitely
Esteban C Borsani
• 10 Apr '21

You are welcome. I'm glad you were able to sort it out.

gpsbird's comment was removed 5 months, 1 week ago