Skip to content
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

Logs for the Feed update #7

Closed
lucashmsilva opened this issue Feb 26, 2022 · 11 comments
Closed

Logs for the Feed update #7

lucashmsilva opened this issue Feb 26, 2022 · 11 comments

Comments

@lucashmsilva
Copy link

Is there any logs for the feed update that is set inside the web application? My feeds are not fetching new episodes automatically even after many days the new episode is available in Spotify. When I manually use the "refresh" feature the the episode is fetched. With some logs I'll to check if the schedule is acctually running or any errors are occuring.

@Yetangitu
Copy link
Owner

Yetangitu commented Feb 27, 2022

I assume you did update the schedule? Just clicking the Enable scheduled updates button does not by itself enable updates, you need to click Update to install the cron job. I'll rename that button to Update schedule in the next release to make this a bit clearer. It does not install the cron job because I assume most people will want to edit the update schedule but maybe I'm wrong here? I'll give it a thought.

Check if the cron job is installed (sudo crontab -u www-data -l on Debian and friends). If it is installed, logs should be sent through mail to wherever your web user mail goes - usually to root. Change the value of LOG_LEVEL in the Spodcast config file to something more verbose (debug is the most verbose, you'll get tons of useless drivel, default is warning which only reports downloaded episodes and errors). Check the web server error log and/or php-fpm log to see if anything out of order is reported.

I'm currently working on the next release which will probably add more logging so if you don't get it running before I release it that might be of help.

@lucashmsilva
Copy link
Author

I have Updated the schedule configuration througth that button, but after checking for the cron job installation I noticed that it was not even installed. The command you suggested returns no crontab for www-data. The php-fpm log file is clean and the nginx error log has nothing special either. Is it possible to be some privilege restriction to update the crontab?

@Yetangitu
Copy link
Owner

Yes, it is possible for the web-user to not be allowed to have a crontab.. Which OS do you run, and what version?

@lucashmsilva
Copy link
Author

Currently I'm running in a Digital Ocean Droplet with Ubuntu 20.04. The setup is a little convoluted... I run a Nginx Docker Container and a local installation of Spodcast.

@Yetangitu
Copy link
Owner

The web user should be able to create cron jobs and should be able to write to the Spodcast root path. If either of these conditions are not met, updates will not work. The most likely problem here is that you're using a Docker container for your web server as these normally do not support cron jobs. There are workarounds but these are quite convoluted. The best solution here is probably to either use a normal nginx install or add cron to your nginx Docker image.

An alternative would be to use web cron, I can add an endpoint for this in the next release.

@lucashmsilva
Copy link
Author

lucashmsilva commented Feb 28, 2022

Yhea.. as I run other stuff behind this nginx container that I didn't want to risk breaking, I manually created a Cron job on the server (host, not the container) that is just a curl to the refresh URL. One job for each feed. I think we can close this issue, as it's not a problem with Spodcast.

Thanks, for the help and for this awesome piece of code!

@Yetangitu
Copy link
Owner

The next version - coming soon - will have a web cron endpoint, that should make things easier. Closing this issue.

@Yetangitu
Copy link
Owner

Yetangitu commented Mar 1, 2022

The latest release (0.4.1) contains both the mentioned web cron endpoint as well as some logging settings. To use webcron simply point any web client - curl or wget do wonders here - at:

SPODCAST_URL/?action=update_shows

This will initiate a feed update for all shows, using their respective sync and keep settings. At the end of the update it will return a json-encoded report on its activities. The verbosity of that report depends on the setting of the log level, this can be done in the settings screen.

Give it a try and let me know if it works as intended.

@Yetangitu
Copy link
Owner

Oops, problem with 0.4.1, wait 'till 0.4.2...

@Yetangitu
Copy link
Owner

Fixed now, 0.4.2 is up on Github and PyPi

@lucashmsilva
Copy link
Author

Thanks!! I'll give it a try here and let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants