File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
app/code/Magento/MessageQueue/Setup Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \MessageQueue \Setup ;
9
+
10
+ use Magento \Framework \MessageQueue \PoisonPill \PoisonPillPutInterface ;
11
+ use Magento \Framework \Setup \InstallSchemaInterface ;
12
+ use Magento \Framework \Setup \ModuleContextInterface ;
13
+ use Magento \Framework \Setup \SchemaSetupInterface ;
14
+
15
+ /**
16
+ * Put the poison pill after each potential deployment.
17
+ */
18
+ class Recurring implements InstallSchemaInterface
19
+ {
20
+ /**
21
+ * @var PoisonPillPutInterface
22
+ */
23
+ private $ poisonPillPut ;
24
+
25
+ /**
26
+ * @param PoisonPillPutInterface $poisonPillPut
27
+ */
28
+ public function __construct (PoisonPillPutInterface $ poisonPillPut )
29
+ {
30
+ $ this ->poisonPillPut = $ poisonPillPut ;
31
+ }
32
+
33
+ /**
34
+ * Put the Poison Pill after each 'setup:upgrade' command run.
35
+ *
36
+ * @param SchemaSetupInterface $setup
37
+ * @param ModuleContextInterface $context
38
+ *
39
+ * @throws \Exception
40
+ *
41
+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
42
+ */
43
+ public function install (SchemaSetupInterface $ setup , ModuleContextInterface $ context )
44
+ {
45
+ $ this ->poisonPillPut ->put ();
46
+ }
47
+ }
You can’t perform that action at this time.
0 commit comments