Hoogle Search
Within LTS Haskell 24.34 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
asum :: (Foldable t, Alternative f) => t (f a) -> f aconfiguration-tools Configuration.Utils.CommandLine The sum of a collection of actions using (<|>), generalizing concat. asum is just like msum, but generalised to Alternative.
Examples
Basic usage:>>> asum [Just "Hello", Nothing, Just "World"] Just "Hello"
-
Concurrent PostgreSQL data consumers Library for setting up concurrent consumers of data stored inside PostgreSQL database in a simple, declarative manner.
module Database.PostgreSQL.
Consumers No documentation available.
-
consumers Database.PostgreSQL.Consumers Run the consumer. The purpose of the returned monadic action is to wait for currently processed jobs and clean up. This function is best used in conjunction with finalize to seamlessly handle the finalization. If you want to add metrics, see the consumers-metrics-prometheus package to seamlessly instrument your consumer.
-
consumers Database.PostgreSQL.Consumers No documentation available.
-
consumers Database.PostgreSQL.Consumers.Components Run the consumer. The purpose of the returned monadic action is to wait for currently processed jobs and clean up. This function is best used in conjunction with finalize to seamlessly handle the finalization. If you want to add metrics, see the consumers-metrics-prometheus package to seamlessly instrument your consumer.
-
consumers Database.PostgreSQL.Consumers.Components No documentation available.
data
ConsumerConfig (m :: Type -> Type) idx jobconsumers Database.PostgreSQL.Consumers.Config Config of a consumer.
-
consumers Database.PostgreSQL.Consumers.Config No documentation available.
ccConsumersTable :: ConsumerConfig (m :: Type -> Type) idx job -> !RawSQL ()consumers Database.PostgreSQL.Consumers.Config Name of a database table where registered consumers are stored. The table itself needs to have the following columns:
- id - represents ID of a consumer. Needs to be a primary key of the type SERIAL or BIGSERIAL (recommended).
- name - represents jobs table of the consumer. Needs to be not nullable, of type TEXT. Allows for tracking consumers of multiple queues with one table. Set to ccJobsTable.
- last_activity - represents the last registered activity of the consumer. It's updated periodically by all currently running consumers every 30 seconds to prove that they are indeed running. They also check for the registered consumers that didn't update their status for a minute. If any such consumers are found, they are presumed to be not working and all the jobs reserved by them are released. This prevents the situation where a consumer with reserved jobs silently fails (e.g. because of a hard crash) and these jobs stay locked forever, yet are never processed.