Skip to content

Instantly share code, notes, and snippets.

View brutasse's full-sized avatar
🤌

Bruno Renié brutasse

🤌
View GitHub Profile

Replication

Sync process is:

  • make a base backup
  • catch up with changes that happened during the base backup using master's WAL files
  • stream

Make sure master's wal_keep_segments is set to a high enough value to allow tracking all changes happening during the base backup. Restart needed when changing this.

// The name of the Gmail Labels that are to be purged
var GMAIL_LABELS = [
"list",
"of",
"labels",
"to",
"purge",
];
// Purge messages automatically after that many days
def find_api_views(urls, views=None):
if views is None:
views = []
for entry in urls:
if hasattr(entry, 'url_patterns'):
views.extend(find_api_views(entry.url_patterns))
else:
view = entry.callback
if (
hasattr(view, 'cls') and