Pasture: PeerTube joins, and its videos play through us
PeerTube 8.3.1 runs on the shared Postgres and Redis, transcoding off. Its scenario passes 24 checks: a persona follows a channel; a new video comes as the channel's Announce and reaches the persona's home as a boost, playable through the media proxy with byte ranges; comments both ways thread; a like and its undo count; renaming and deletion arrive; the unfollow; statistics. The town's seeder also takes reruns on the same accounts in its stride: a Lemmy community already made is found, a circle member already approved asks nothing again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
1 parent
d61eac0a01
commit
40217f3261
8 files changed
+187
-2
No files matched your search
@@ -77,7 +77,13 @@ class LemmyApi(Driver):
|
||||
|
||||
# -- communities and people
|
||||
def community(self, s, name, title):
|
||||
return self.lm(s, "POST", "community", {"name": name, "title": title})["community_view"]["community"]
|
||||
try:
|
||||
return self.lm(s, "POST", "community", {"name": name, "title": title})["community_view"]["community"]
|
||||
except HttpError as e:
|
||||
# a run on accounts an earlier run made finds the community it made
|
||||
if "already_exists" not in str(e):
|
||||
raise
|
||||
return self.lm(s, "GET", "community", params={"name": name})["community_view"]["community"]
|
||||
|
||||
def resolve_community(self, s, ref):
|
||||
"""ref: !name@host"""
|
||||
|
||||
@@ -261,6 +261,11 @@ class Seeder:
|
||||
member=member, state="local")
|
||||
return
|
||||
member_uri = self.session(member).actor_uri
|
||||
# a member an earlier run on these accounts approved asks nothing again
|
||||
if podman.mongo(f"db.Follower.findOne({{LocalActorId: '{group['id']}', ActorURI: '{member_uri}', IsAccepted: true}}, {{_id: 1}})"):
|
||||
self.ledger.add(type="relation", n=s["n"], verb="approve", actor=s["actor"], group=s["args"]["group"],
|
||||
member=member, state="accepted", already=True)
|
||||
return
|
||||
for _ in range(30):
|
||||
found = podman.mongo(f"db.Follower.findOne({{LocalActorId: '{group['id']}', IsAccepted: false}}, {{ActorURI: 1}})")
|
||||
pending = podman.mongo(f"db.Follower.find({{LocalActorId: '{group['id']}', IsAccepted: false}}, {{ActorURI: 1}}).toArray()") or []
|
||||
|
||||
Reference in new issue
Block a user