You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After that this specific operation will not be processed anymore.
169
+
After that, this operation will not be processed anymore.
155
170
156
-
#### Force syncronously/asyncronously execution
171
+
###Dispatching Jobs syncronously or asyncronously
157
172
158
-
By providing the `--sync` or `--async` option, the `$async` flag in all the files will be ignored and the operation will be executed based on the given flag.
173
+
By default, all operations are being exectued with the `OneTimeOperationProcessJob` based on your `queue.default` configuration.
174
+
By providing the `--sync` or `--async` option, the `$async` attribute in all the files will be ignored and the operation will be executed based on the given flag.
159
175
160
176
```shell
161
-
php artisan operations:process --sync
162
-
php artisan operations:process --async
177
+
php artisan operations:process --async // force OneTimeOperationProcessJob::dispatch()
178
+
php artisan operations:process --sync // force OneTimeOperationProcessJob::dispatchSync()
163
179
```
164
180
165
-
#### Re-run an operation manually
181
+
**Hint!** If `operation:process` is part of your deployment process, it is **not recommended** to process the operations syncronously,
182
+
since an error in your operation could make your whole deployment fail.
166
183
167
-
If something went wrong, you can process an operation manually by providing the **name** of the operation.
168
-
This will process the operation again, even if it was processed before.
184
+
### Re-run an operation manually
185
+
186
+

187
+
188
+
If something went wrong, you can process an operation manually by providing the **name of the operation** as parameter in `operations:process`.
189
+
This will process the operation again, even if it was processed before (confirmation is required).
You might want to test your code a couple of times before flagging the operation as "processed". Provide the `--test` flag to run the command again and again.

206
+
184
207
So you don't have to check the database or the directory for the existing operations,
185
208
you can show a list with `operations:show`.
186
209
Filter the list with the available filters `pending`, `processed` and `disposed`.
@@ -194,6 +217,14 @@ php artisan operations:show pending // show only pending operations
194
217
php artisan operations:show pending disposed // show only pending and disposed operations
195
218
```
196
219
220
+
### Deleting operations
221
+
222
+
The whole idea of this package is, that you can dispose the operations once they were executed, so your project won't be cluttered with files and code, you won't be using anymore.
223
+
224
+
So you just need to **delete the files from your repository**
225
+
226
+
The deleted operations will be shown as ``DISPOSED`` when you call `operations:show`, so you still have a history on all the processed operations.
0 commit comments