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
php artisan operations:process // process all new operation files
51
51
52
-
php artisan operations:process --sync // force syncronously execution
53
-
php artisan operations:process --async // force asyncronously execution
52
+
php artisan operations:process --sync // force synchronous execution
53
+
php artisan operations:process --async // force asynchronous execution
54
54
php artisan operations:process --test // dont flag operations as processed
55
55
php artisan operations:process --isolated // run command isolated
56
56
@@ -134,7 +134,7 @@ use TimoKoerber\LaravelOneTimeOperations\OneTimeOperation;
134
134
return new class extends OneTimeOperation
135
135
{
136
136
/**
137
-
* Determine if the operation is being processed asyncronously.
137
+
* Determine if the operation is being processed asynchronously.
138
138
*/
139
139
protected bool $async = true;
140
140
@@ -170,13 +170,13 @@ public function process(): void
170
170
}
171
171
```
172
172
173
-
By default, the operation is being processed ***asyncronously*** (based on your configuration) by dispatching the job `OneTimeOperationProcessJob`.
173
+
By default, the operation is being processed ***asynchronously*** (based on your configuration) by dispatching the job `OneTimeOperationProcessJob`.
174
174
By default, the operation is being dispatched to the `default` queue of your project. Change the `$queue` as you wish.
175
175
176
-
You can also execute the code syncronously by setting the `$async` flag to `false`.
176
+
You can also execute the code synchronously by setting the `$async` flag to `false`.
177
177
_(this is only recommended for small operations, since the processing of these operations should be part of the deployment process)_
178
178
179
-
**Hint:** If you use syncronous processing, the `$queue` attribute will be ignored (duh!).
179
+
**Hint:** If you use synchronous processing, the `$queue` attribute will be ignored (duh!).
180
180
181
181
### Create a cleaner operation file
182
182
@@ -205,19 +205,19 @@ Your code will be executed, and you will find all the processed operations in th
205
205
206
206
After that, this operation will not be processed anymore.
207
207
208
-
### Dispatching Jobs syncronously or asyncronously
208
+
### Dispatching Jobs synchronously or asynchronously
209
209
210
210
For each operation a `OneTimeOperationProcessJob` is being dispatched,
211
211
either with `dispatch()` oder `dispatchSync()` based on the `$async` attribute in the operation file.
212
212
213
-
By providing the `--sync` or `--async` option with the `operations:process` command, you can force a syncronously/asyncronously execution and ignore the attribute:
213
+
By providing the `--sync` or `--async` option with the `operations:process` command, you can force a synchronously/asynchronously execution and ignore the attribute:
214
214
215
215
```shell
216
216
php artisan operations:process --async // force dispatch()
217
217
php artisan operations:process --sync // force dispatchSync()
218
218
```
219
219
220
-
**Hint!** If `operation:process` is part of your deployment process, it is **not recommended** to process the operations syncronously,
220
+
**Hint!** If `operation:process` is part of your deployment process, it is **not recommended** to process the operations synchronously,
221
221
since an error in your operation could make your whole deployment fail.
0 commit comments