Skip to content

Commit d7c8246

Browse files
authored
Merge pull request #11 from MammatusPHP/introduce-producer
Introduce Producer
2 parents f797690 + 1330e14 commit d7c8246

24 files changed

+736
-385
lines changed

bin/mammatus-queue

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/php
22
<?php declare(strict_types=1);
33

4+
use Mammatus\Argv;
5+
use Mammatus\Boot;
46
use Mammatus\Queue\App;
57
use Mammatus\ContainerFactory;
68

@@ -15,5 +17,5 @@ use Mammatus\ContainerFactory;
1517
/**
1618
* Create and run that one cron job
1719
*/
18-
exit((static fn (string $className): int => ContainerFactory::create()->get(App::class)->run($className))($className));
20+
exit(Boot::boot(App::class, new App\Queue($className))->value);
1921
})($argv[1]);

composer.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"mammatus/life-cycle-events": "^2",
1616
"mammatus/queue-attributes": "dev-main",
1717
"mammatus/queue-contracts": "dev-main",
18-
"psr/container": "^1.1.2",
18+
"psr/container": "^1.1.2 || ^2",
1919
"psr/event-dispatcher": "^1.0",
2020
"psr/log": "^2",
2121
"queue-interop/queue-interop": "^0.8.1",
@@ -27,6 +27,7 @@
2727
"wyrihaximus/broadcast-contracts": "^1.3",
2828
"wyrihaximus/generative-composer-plugin-tooling": "^1",
2929
"wyrihaximus/monolog-factory": "^2",
30+
"wyrihaximus/psr-3-callable-throwable-logger": "^2.3",
3031
"wyrihaximus/psr-3-context-logger": "^2.0",
3132
"wyrihaximus/simple-twig": "^2.2.1",
3233
"wyrihaximus/ticking-promise": "^3.1"
@@ -68,6 +69,7 @@
6869
"extra": {
6970
"class": "Mammatus\\Queue\\Composer\\Installer",
7071
"mammatus": {
72+
"has-bootable": true,
7173
"queue": {
7274
"has-workers": true
7375
}
@@ -86,11 +88,13 @@
8688
"scripts": {
8789
"post-install-cmd": [
8890
"composer normalize",
89-
"composer update --lock --no-scripts"
91+
"composer update --lock --no-scripts",
92+
"make cs-fix"
9093
],
9194
"post-update-cmd": [
9295
"composer normalize",
93-
"composer update --lock --no-scripts"
96+
"composer update --lock --no-scripts",
97+
"make cs-fix"
9498
],
9599
"pre-autoload-dump": [
96100
"Mammatus\\Queue\\Composer\\Installer::findActions"

0 commit comments

Comments
 (0)