2.3. Internals

2.3.1. Database schema

2.3.1.1. User storage

Name Type Contents
users hash Hash mapping usernames to UIDs
user:uid hash All the data we have on the user (see Users documentation)

2.3.1.2. Caching site

Name Type Contents
site:timeline list list of JSON lists of data needed to initialize a Post
site:all_posts list list of indexes for timeline matching all_posts
site:posts list list of indexes for timeline matching posts
site:pages list list of indexes for timeline matching pages
site:rev string revision (incremented at each scan; used to determine if updates are needed)
site:lock string lock on site DB

2.3.2. coil.utils

coil.utils.ask(query, default=None)

Ask a question.

coil.utils.ask_yesno(query, default=None)

Ask a yes/no question.

class coil.utils.SiteProxy(db, site, logger)

A proxy for accessing the site in a multiprocessing-safe manner.

all_posts

Get all_posts, reloading the site if needed.

pages

Get pages, reloading the site if needed.

posts

Get posts, reloading the site if needed.

reload_site()

Reload the site from the database.

scan_posts(really=True, ignore_quit=False, quiet=True)

Rescan the site.

timeline

Get timeline, reloading the site if needed.

2.3.3. coil.web