Skip to content

Commit

Permalink
update: oxmysql version '2.7.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Jan 21, 2024
1 parent 20d9cb8 commit 849962e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
31 changes: 15 additions & 16 deletions server-data/resources/[ox]/oxmysql/dist/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -24767,6 +24767,11 @@ RegisterCommand(
true
);

// src/utils/sleep.ts
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}

// src/database/connection.ts
var import_promise = __toESM(require_promise());

Expand All @@ -24781,15 +24786,8 @@ var pool;
var isServerConnected = false;
var dbVersion = "";
async function waitForConnection() {
if (!isServerConnected) {
return await new Promise((resolve) => {
(function wait() {
if (isServerConnected) {
return resolve(true);
}
setTimeout(wait);
})();
});
while (!isServerConnected) {
await sleep(0);
}
}
async function createConnectionPool() {
Expand All @@ -24813,11 +24811,8 @@ async function createConnectionPool() {
}
}
async function getPoolConnection() {
if (!pool) {
await createConnectionPool();
if (!pool)
return;
}
if (!isServerConnected)
await waitForConnection();
scheduleTick();
return pool.getConnection();
}
Expand Down Expand Up @@ -25285,9 +25280,13 @@ ${err.message}`;
};

// src/database/index.ts
setTimeout(() => {
setTimeout(async () => {
setDebug();
getPoolConnection();
while (!isServerConnected) {
await createConnectionPool();
if (!isServerConnected)
await sleep(3e4);
}
});
setInterval(() => {
setDebug();
Expand Down
2 changes: 1 addition & 1 deletion server-data/resources/[ox]/oxmysql/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ game 'common'

name 'oxmysql'
description 'Database wrapper for FXServer utilising node-mysql2 offering improved performance and security.'
version '2.7.6'
version '2.7.7'
url 'https://github.com/overextended/oxmysql'
author 'overextended'

Expand Down

0 comments on commit 849962e

Please sign in to comment.