mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-04 05:23:15 -06:00
Merge branch 'main' into golangci-lint-upgrade
This commit is contained in:
commit
8ccff37525
65 changed files with 16223 additions and 15320 deletions
|
|
@ -402,6 +402,18 @@ func maxOpenConns() int {
|
|||
if multiplier < 1 {
|
||||
return 1
|
||||
}
|
||||
|
||||
// Specifically for SQLite databases with
|
||||
// a journal mode of anything EXCEPT "wal",
|
||||
// only 1 concurrent connection is supported.
|
||||
if strings.ToLower(config.GetDbType()) == "sqlite" {
|
||||
journalMode := config.GetDbSqliteJournalMode()
|
||||
journalMode = strings.ToLower(journalMode)
|
||||
if journalMode != "wal" {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
return multiplier * runtime.GOMAXPROCS(0)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build !moderncsqlite3
|
||||
//go:build !moderncsqlite3 && !nowasm
|
||||
|
||||
package sqlite
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build moderncsqlite3
|
||||
//go:build moderncsqlite3 || nowasm
|
||||
|
||||
package sqlite
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build !moderncsqlite3
|
||||
//go:build !moderncsqlite3 && !nowasm
|
||||
|
||||
package sqlite
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//go:build moderncsqlite3
|
||||
//go:build moderncsqlite3 || nowasm
|
||||
|
||||
package sqlite
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue