pgflow Flow that creates monthly partitions for ga_events.
Ensures partitions exist for the current month and 2 months ahead. Can be triggered on demand or scheduled via cron.
Usage
Add this flow to your PgFlow configuration:
{PgFlow,
repo: MyApp.Repo,
flows: [GoodAnalytics.Flows.CreatePartitions]}Workers compile the flow definition at startup. To compile it ahead of time in a migration instead:
mix pgflow.gen.flow_migration GoodAnalytics.Flows.CreatePartitions
mix ecto.migrateRequires PgFlow 0.5 with core schema version 2 and helpers version 6
(mix pgflow.check_schema).
To trigger manually:
PgFlow.start_flow(GoodAnalytics.Flows.CreatePartitions, %{})
Summary
Functions
Returns the cron expression, or nil if not scheduled.
Returns the static cron input map.
Returns the flow definition struct.
Pattern-matched handler function for each step.
Returns the flow slug.
Returns the raw step definitions.
Functions
Returns the cron expression, or nil if not scheduled.
Returns the static cron input map.
Returns the flow definition struct.
Pattern-matched handler function for each step.
Returns the flow slug.
Returns the raw step definitions.