Open TcT2k opened 5 years ago
The script requires a config file which does not seem to be syncserver.ini.
Hrm, good point - it does actually expect the same config file, but it doesn't know how to fill in a bunch of sensible defaults that the syncserver
package provides when running the server:
https://github.com/mozilla-services/syncserver/blob/master/syncserver/__init__.py#L34
One option to try to get up and running here, would be to try to add explicit sections in syncserver.ini
to get python -m syncstorage.scripts.purgettl syncserver.ini
working correctly. I expect it needs at least the [storage]
section which the syncserver
package automagically configures here:
https://github.com/mozilla-services/syncserver/blob/master/syncserver/__init__.py#L105
Thanks for the hint, I've added the following to my syncserver.ini
:
[storage]
backend = syncstorage.storage.sql.SQLStorage
sqluri = (copied from syncserver.sqluri)
The script only outputs No handlers could be found for logger "mozsvc"
but records seem to be removed from the bso
table.
I've two remaining questions:
batch_upload_items
table still used or is it superseded by the bso
table?Is the script meant to be kept running as a kind a background service?
Yes, by default it will purge some items and then sleep in a loop. Depending on your setup you might find it simpler to run with the --oneshot
option and just trigger it via cron or similar.
Is the batch_upload_items table still used or is it superseded by the bso table?
It's used as a temporary staging area when uploading large numbers of items. So it's still active and required, but it's OK for it to be empty if nobody is in the middle of uploading any items.
In the documentation there is a missing section on:
I assume that this would be done using the
python -m syncstorage.scripts.purgettl
script. The script requires a config file which does not seem to besyncserver.ini
. It would be nice to gain inside into how to run this to reduce the growing database (in my case 700MB for a single user).