Download the PHP package quazardous/gramphp-bundle without Composer
On this page you can find all versions of the php package quazardous/gramphp-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download quazardous/gramphp-bundle
More information about quazardous/gramphp-bundle
Files in quazardous/gramphp-bundle
Package gramphp-bundle
Short Description Symfony integration for gramphp: graphs declared in configuration as journal services over the Doctrine connection, the tables in the Doctrine schema, janitor and drawing commands.
License MIT
Homepage https://github.com/quazardous/gramphp-bundle
Informations about the package gramphp-bundle
gramphp-bundle
The Symfony integration of gramphp — a small workflow graph for work queues that already live in your database. Graphs declared in configuration become journal services over your Doctrine connection; the tables join your migrations; the janitor runs as commands.
Symfony 6.4, 7 or 8; DoctrineBundle 2 or 3; MariaDB (or MySQL 8).
Configure
A graph file is gramphp's canonical form — grampy's format, the same file in
Python and PHP — as Graph::toJson() writes it. definition: takes the same
form inline.
gramphp's MariaDB driver needs READ COMMITTED. Set it when the connection opens:
Use
Each graph is a NodeJournal service, gramphp.journal.<name>, autowired by
argument name — or by type when there is a single graph:
The journals run on your own connection: node rows and your writes can go in one transaction.
The tables
With the ORM, the gramphp tables join the schema it generates:
doctrine:migrations:diff creates them, and never proposes to drop them. A
test checks that a diff on tables gramphp's own DDL created proposes nothing.
Without the ORM, bin/console gramphp:schema --dump-sql prints the
CREATE TABLE statements for your migration; --force runs them.
The janitor, the monitoring, the drawing
| command | does |
|---|---|
gramphp:expire [graphs…] |
gives back the leases held longer than their node allows |
gramphp:settle [graphs…] --limit=500 |
concludes waits, lets due arrivals through their lanes, skips optional nodes past their grace — on the graph's candidates, in passes of --limit |
gramphp:prune-history --before='-30 days' |
deletes old history, except what a retry or loop bound counts |
gramphp:snapshot [graphs…] --format=table\|json |
where each node stands: counts, oldest running, next retry due, ready and since when |
gramphp:diagram <graph> --format=mermaid\|state\|dot --counts |
draws the graph, with live counts |
Schedule the janitor with cron or Symfony Scheduler; feed snapshot to your
monitoring.
Development
Everything runs in Docker:
License
MIT.
All versions of gramphp-bundle with dependencies
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^2.11 || ^3.0
quazardous/gramphp Version ^0.1
symfony/config Version ^6.4 || ^7.0 || ^8.0
symfony/console Version ^6.4 || ^7.0 || ^8.0
symfony/dependency-injection Version ^6.4 || ^7.0 || ^8.0
symfony/framework-bundle Version ^6.4 || ^7.0 || ^8.0
symfony/http-kernel Version ^6.4 || ^7.0 || ^8.0