Skip to content

Commit e7105f2

Browse files
The description is actualized
1 parent 37f5973 commit e7105f2

File tree

8 files changed

+68
-59
lines changed

8 files changed

+68
-59
lines changed

docs/snippets/operations_status.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2025_04_02_100000_some ............................................ [1] Ran
2+
2025_04_02_100001_some ............................................ [1] Ran
3+
2025_04_02_100002_some ............................................ [2] Ran
4+
2025_04_02_100003_some............................................. [3] Ran
5+
2025_04_02_100004_some............................................. [3] Ran
6+
2025_04_02_100005_some............................................. Pending
7+
2025_04_02_100006_some............................................. Pending

docs/topics/creating-operations.topic

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,29 @@
1212

1313
<show-structure depth="2" />
1414

15-
<p>
16-
To create an operation use the <code>%command_make%</code> artisan command:
17-
</p>
15+
<snippet id="creating">
16+
<p>
17+
To create an operation use the <code>%command_make%</code> artisan command:
18+
</p>
1819

19-
<code-block lang="bash">
20+
<code-block lang="bash">
2021
%artisan% %command_make% some_name
2122
</code-block>
2223

23-
<p>
24-
The new operation's file will be placed in your <code>%directory%</code> directory in the base path of your app.
25-
</p>
24+
<p>
25+
The new operation's file will be placed in your
26+
<code>%directory%</code> directory in the base path of your app.
27+
</p>
28+
29+
<p>
30+
Each operation file name contains a timestamp, which allows Laravel to determine the order of the operations.
31+
For example,
32+
</p>
2633

27-
<p>
28-
Each operation file name contains a timestamp, which allows Laravel to determine the order of the operations.
29-
</p>
34+
<code-block lang="bash">
35+
2025_04_02_121627_some_name.php
36+
</code-block>
37+
</snippet>
3038

3139
<chapter title="Asks For File Name" id="asks_for_file_name">
3240
<tip>
@@ -52,11 +60,16 @@
5260
then the file name will be generated automatically according to the rule:
5361
</p>
5462

63+
<code-block lang="bash" src="make_auto.sh" />
64+
5565
<tip>
56-
git branch name ?: 'auto'
66+
<p>
67+
The name for the file will be automatically obtained from the currently active git repository branch at the root of the project.
68+
</p>
69+
<p>
70+
If the branch name cannot be determined, the word “auto” will be used.
71+
</p>
5772
</tip>
58-
59-
<code-block lang="bash" src="make_auto.sh" />
6073
</chapter>
6174

6275
<chapter title="Nested Files" id="nested_files">

docs/topics/customize-stub.topic

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
</p>
2020

2121
<code-block lang="bash">
22-
%publish_files%
22+
%vendor_publish%
2323
</code-block>
2424

2525
<p>
26-
As a result, the file <code>stubs/deploy-operation.stub</code> will be created in the root of the project,
27-
which you can change for yourself.
26+
This will create the file <code>stubs/deploy-operation.stub</code>, which you can modify to suit you.
27+
2828
</p>
2929

3030
<code-block

docs/topics/installation.topic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</p>
2929

3030
<code-block lang="bash">
31-
%publish_files%
31+
%vendor_publish%
3232
</code-block>
3333

3434
<p>

docs/topics/operations-status.topic

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,10 @@
2020
<code-block lang="bash">
2121
%artisan% %command_status%
2222
</code-block>
23+
24+
<p>
25+
For example,
26+
</p>
27+
28+
<code-block lang="bash" src="operations_status.sh" />
2329
</topic>

docs/topics/running-operations.topic

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<code-block lang="bash" src="order_running_operations.sh" />
3131
</snippet>
3232

33-
<chapter title="Isolating Operations Execution" id="isolating_operations_execution">
33+
<chapter title="Isolating Execution" id="isolating_execution">
3434
<p>
3535
If you are deploying your application across multiple servers and running operations as part of your deployment process,
3636
you likely do not want two servers attempting to run the database at the same time.
@@ -43,7 +43,7 @@
4343
</code-block>
4444
</chapter>
4545

46-
<chapter title="Split Launch Option" id="split_launch_option">
46+
<chapter title="Split Execution" id="split_execution">
4747
<p>
4848
Sometimes it becomes necessary to launch operations separately, for example, to notify about the successful deployment of a project.
4949
</p>
@@ -93,7 +93,7 @@
9393
</note>
9494
</chapter>
9595

96-
<chapter title="Forcing Operations To Run In Production" id="forcing_operations_to_run_in_production">
96+
<chapter title="Forcing Operations" id="forcing_operations">
9797
<tip>
9898
Some commands cannot be executed in production without confirmation.
9999
These include all commands except <code>%command_status%</code> and <code>%command_run%</code>.
@@ -111,7 +111,7 @@
111111
</code-block>
112112
</chapter>
113113

114-
<chapter title="Execution Every Time" id="execution_every_time">
114+
<chapter title="Every Time" id="every_time">
115115
<p>
116116
In some cases, you need to call the code every time you deploy the application. For example, to call reindexing.
117117
</p>
@@ -140,7 +140,7 @@
140140
</note>
141141
</chapter>
142142

143-
<chapter title="Execution In A Specific Environment" id="execution_in_a_specific_environment">
143+
<chapter title="Specific Environment" id="specific_environment">
144144
<note>
145145
By default, the operation will run in all environments.
146146
</note>
@@ -183,6 +183,16 @@
183183
</p>
184184

185185
<code-block lang="php" src="within_transactions.php" include-lines="5-" />
186+
187+
<tip>
188+
<p>
189+
The number of code execution attempts in case of transaction errors is set in the
190+
<a href="%config_url%">settings</a> file.
191+
</p>
192+
<p>
193+
By default, the number of attempts is %transactions_attempts%.
194+
</p>
195+
</tip>
186196
</chapter>
187197

188198
<chapter title="Asynchronous Call" id="asynchronous_call">
@@ -198,7 +208,7 @@
198208

199209
<p>
200210
In this case, the operation file that defines this parameter will run asynchronously using the
201-
<code>DragonCode\LaravelDeployOperations\Jobs\OperationJob</code> class.
211+
<code>DragonCode\LaravelDeployOperations\Jobs\OperationJob</code> job.
202212
</p>
203213

204214
<p>

docs/topics/usage.topic

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,11 @@
1212

1313
<show-structure depth="2" />
1414

15-
<p>
16-
Create your first operation using <code>%command_make%</code> command and define the actions it should perform.
17-
</p>
15+
<chapter title="Creating Operation" id="creating_operation">
16+
<include from="creating-operations.topic" element-id="creating" />
17+
</chapter>
1818

19-
<code-block lang="bash">
20-
%artisan% %command_make%
21-
</code-block>
22-
23-
<p>
24-
This action will create a new file in the <code>%directory%</code> folder of your application.
25-
</p>
26-
27-
<p>
28-
If you are using the <code>git</code> version control system,
29-
the name of the currently active branch will be used as the file name suffix,
30-
otherwise the word <code>auto</code> will be used.
31-
</p>
32-
33-
<p>
34-
You can also specify a name for the file yourself by specifying it with the first argument.
35-
For example, <code>%artisan% %command_make% qwerty</code>.
36-
</p>
37-
38-
<code-block lang="php" src="example.php" include-lines="5-" />
39-
40-
<include from="running-operations.topic" element-id="run_all" />
41-
42-
<p>
43-
In addition to other options described in the
44-
<a href="running-operations.topic">
45-
<format style="bold">Guide</format>
46-
</a> section, you can divide the execution of operations into "before" and "after" certain actions. For example, before and after restarting the queues:
47-
</p>
48-
49-
<code-block lang="bash" src="before_after.sh" />
19+
<chapter title="Running Operation" id="running_operation">
20+
<include from="running-operations.topic" element-id="run_all" />
21+
</chapter>
5022
</topic>

docs/v.list

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717

1818
<var name="artisan" value="php artisan" />
1919

20-
<var name="publish_files" value="php artisan vendor:publish --tag deploy-operations" />
20+
<var name="vendor_publish" value="%artisan% vendor:publish --tag deploy-operations" />
2121

22-
<var name="config_filename" value="config/localization.php" />
22+
<var name="config" value="config/localization.php" />
2323
<var name="directory" value="/operations" />
2424
<var name="table" value="operations" />
25+
<var name="transactions_attempts" value="1" />
2526

2627
<var name="badge_not_supported" value="badge-not-supported.svg" />
2728
<var name="badge_supported" value="badge-supported.svg" />

0 commit comments

Comments
 (0)