MishkaCmsCore. Runtime. Workers. ShareCardPlanWorker
(Mishka CMS Core v0.0.1)
Copy Markdown
View Source
Collects every share card of a site and queues a look at each: the planner
MishkaCmsCore.Runtime.ShareCard.redraw_all/2 enqueues, on :share_cards.
It asks the producers for their cards through MishkaCmsCore.Runtime.ShareCard.targets/2, then
inserts, in batches of 500:
- a
MishkaCmsCore.Runtime.Workers.ShareCardRefreshWorkerjob for each{:page, id}and{:record, kind, captures}, with the planner'sforce; - each
Oban.Jobchangeset a producer answered with, as it is — one on another queue than:share_cardsis left out.
Asked for every producer's cards, it then queues a
MishkaCmsCore.Runtime.Workers.ShareCardSweepWorker, which deletes the card files none of those
looks showed once they have run. A target two producers name is looked at once. While the targets event cannot run — one of its
plugins is started but not loaded — the planner waits 30 seconds and asks again.
One planner a site, force and producer waits at a time: a second request while one waits is
that one. Once its looks are queued it broadcasts
{:share_cards_planned, %{site_id:, force:, producer:, counts: %{producer => looks}}} on
planned_topic/0 of MishkaCmsCore.PubSub.
Summary
Functions
The PubSub topic a planner says on how many looks it queued.
Functions
@spec planned_topic() :: String.t()
The PubSub topic a planner says on how many looks it queued.