Skip to content

fix: mysql.ready called before functions.lua is loaded#1780

Merged
Zykem merged 1 commit into
esx-framework:mainfrom
FabianTerhorst:main
May 8, 2026
Merged

fix: mysql.ready called before functions.lua is loaded#1780
Zykem merged 1 commit into
esx-framework:mainfrom
FabianTerhorst:main

Conversation

@FabianTerhorst

@FabianTerhorst FabianTerhorst commented May 7, 2026

Copy link
Copy Markdown
Contributor

Description

The code inside common.lua is awaiting mysql to be ready. When its ready it is executing RefreshJobs. This function is loaded from inside functions.lua which is below the common.lua inside the manifest. This change fixes the load order and makes sure RefreshJobs is always loaded before common.lua is executed.

PR Checklist

  • My commit messages and PR title follow the Conventional Commits standard.
  • My changes have been tested locally and function as expected.
  • My PR does not introduce any breaking changes.
  • I have provided a clear explanation of what my PR does, including the reasoning behind the changes and any relevant context.

@CLAassistant

CLAassistant commented May 7, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Zykem Zykem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @FabianTerhorst, merging.

Note: this isn't fixing a current bug. It's prep for an upcoming FiveM scheduler change where CreateThreadNow runs on the current stack instead of deferring. Under that, MySQL.ready could fire before functions.lua loads and ESX.RefreshJobs would be nil.

@Zykem Zykem merged commit 82188ac into esx-framework:main May 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants