Closed marcogiorgio closed 1 year ago
The .lock file should get cleaned up after a successful run. Can you provide the output of ls -lan ./config
(i.e. your config mount on the host).
Sorry, to be more clear, the problem is not that the .lock is not deleted, but that the .dB file is not created. Anyway the output of the command is this:
-rw-r--r-- 1 1000 1000 132 Feb 3 21:39 feed2toot_clientcred.txt
-rw-r--r-- 1 1000 1000 420 Feb 4 01:55 feed2toot.ini
-rw-r--r-- 1 1000 1000 19 Feb 4 12:45 feed2toot.lock
-rw-r--r-- 1 1000 1000 166 Feb 3 21:39 feed2toot_usercred.txt
-rw-r--r-- 1 1000 1000 0 Feb 4 10:23 hashtags.txt
-rw-r--r-- 1 1000 1000 346 Feb 3 22:48 urilist.txt
What I mean is that if your lock file is hanging around it suggests it's not completing the scheduled run correctly, which might be why the cache DB file isn't being created.
The logging is fiddly and I need to make it easier to enable, but if you edit the crontab in /etc/crontabs/root and add --debug
as an argument to feed2toot then on the next run it should log additional information that will give more context.
You may need to apk add nano
if you don't like vi
or fiddling with cat
.
This is what happens if I run the command inside the docker container with the lock file in place:
root@9697aad54d82:/# s6-setuidgid abc python3 /usr/bin/feed2toot --debug -l 5 -c /config/feed2toot.ini 2>&1
configured stdout level 10
Check if lock file is older than timeout (3600 secs)
Found a valid lock file. Exiting immediately.
root@9697aad54d82:/#
If I run the same command when no lock file is present (because I manually deleted it), I see a list of all the feeds retrieved but no errors...
Ok I understood what the problem is... One of the url on my feed list is missing the attribute {summary}. This is not "ignored" and causes the app to not write the .db file. Sorry if I did not realized this sooner!
Glad you got to the bottom of it
Is there an existing issue for this?
Current Behavior
The db file cache specified in feed2toot.ini is not created
Expected Behavior
The db file cache specified in feed2toot.is created
Steps To Reproduce
Deploy the image using this compose file:
docker-compose.yml
```yaml version: "2.1" services: feed2toot: image: lscr.io/linuxserver/feed2toot:latest container_name: feed2toot environment: - PUID=1000 - PGID=1000 - TZ=Europe/Rome volumes: - ./config:/config ```Confirm that feed2toot.ini is configured to use a cache file:
feed2toot.ini
``` [mastodon] instance_url=https://mastodon.URL.com user_credentials=/config/feed2toot_usercred.txt client_credentials=/config/feed2toot_clientcred.txt toot_visibility=private [cache] cachefile=/config/feed2toot.db cache_limit=100 [rss] uri_list=/config/urilist.txt toot={title} {link} \n \n {summary:.200} [lock] lock_file=/config/feed2toot.lock [hashtaglist] several_words_hashtags_list=/config/hashtags.txt ```After the creation of the container and the first rss to mastodon sync, a .lock file is created inside the config folder, but not a .db
Environment
No response
CPU architecture
x86-64
Docker creation
Container logs