Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #70 from renzuzu/a
Browse files Browse the repository at this point in the history
tweak(server): remove mysql sync
  • Loading branch information
renzuzu authored Aug 13, 2021
2 parents b20af4e + e9cd9b0 commit e590d6c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions renzu_garage/server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ end)

function MysqlGarage(plugin,type,query,var)
if type == 'fetchAll' and plugin == 'mysql-async' then
local res = MySQL.Sync.fetchAll(query, var) or {}
return res
local data = nil
local res = MySQL.Async.fetchAll(query, var, function(result)
data = result
end)
while data == nil do Wait(1) end
return data
end
if type == 'execute' and plugin == 'mysql-async' then
MySQL.Sync.execute(query,var)
Expand Down

0 comments on commit e590d6c

Please sign in to comment.