fix: publish feeds atomically
This commit is contained in:
parent
cbb427b89d
commit
e64a32d76b
7 changed files with 253 additions and 4 deletions
|
|
@ -38,6 +38,10 @@ def feed_output_path(*, out_dir: Path, feed_slug: str) -> Path:
|
|||
return feed_output_dir(out_dir=out_dir, feed_slug=feed_slug) / "feed.rss"
|
||||
|
||||
|
||||
def staged_feed_output_path(*, out_dir: Path, feed_slug: str) -> Path:
|
||||
return feed_output_dir(out_dir=out_dir, feed_slug=feed_slug) / ".feed.rss.next"
|
||||
|
||||
|
||||
def _resolve_path(base_path: Path, value: str) -> Path:
|
||||
path = Path(value).expanduser()
|
||||
if not path.is_absolute():
|
||||
|
|
@ -218,7 +222,7 @@ def build_feed_settings(
|
|||
{
|
||||
"REPUBLISHER_OUT_DIR": str(out_dir),
|
||||
"FEEDS": {
|
||||
str(feed_output_path(out_dir=out_dir, feed_slug=feed_slug)): {
|
||||
str(staged_feed_output_path(out_dir=out_dir, feed_slug=feed_slug)): {
|
||||
"format": "rss",
|
||||
"postprocessing": [],
|
||||
"feed_name": feed_slug,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue