Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Dec 30, 2024
1 parent 2fbd94e commit 985972c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ Throwing an exception is a way to let the queue worker know that the job has fai

#### Using transactions

If you have to use transactions in our Jobs - this is a simple schema you can follow.
If you have to use transactions in your Job - this is a simple schema you can follow.

!!! note

Due to the nature of the queue worker, [Strict Mode](https://codeigniter.com/user_guide/database/transactions.html#strict-mode) is automatically disabled for the database connection assigned to the Database handler.
Due to the nature of the queue worker, [Strict Mode](https://codeigniter.com/user_guide/database/transactions.html#strict-mode) is automatically disabled for the database connection assigned to the Database handler. That's because queue worker is a long-running process, and we don't want one failed transaction to affect others.

If you use the same connection group in your Jobs as defined in the Database handler, then in that case, you don't need to do anything.
If you use the same connection group in your Job as defined in the Database handler, then in that case, you don't need to do anything.

On the other hand, if you are using a different group to connect to the database in your Jobs, then if you are using transactions, you should disable Strict Mode through the method: `$db->transStrict(false)` or by setting the `transStrict` option to `false` in your connection config group - the last option will disable Strict Mode globally.
On the other hand, if you are using a different group to connect to the database in your Job, then if you are using transactions, you should disable Strict Mode through the method: `$db->transStrict(false)` or by setting the `transStrict` option to `false` in your connection config group - the last option will disable Strict Mode globally.

```php
// ...
Expand Down

0 comments on commit 985972c

Please sign in to comment.