Skip to content

Conversation

@g-linville
Copy link
Member

@g-linville g-linville commented Aug 10, 2024

I tested this locally with an interval of 30s and it works the way it should. I set the interval here to 30m. Let me know if it should be different.

Sorry for all the random whitespace changes, lol. I guess my WebStorm settings caused that.

Signed-off-by: Grant Linville <grant@acorn.io>
Signed-off-by: Grant Linville <grant@acorn.io>
@g-linville g-linville marked this pull request as ready for review August 10, 2024 15:12
@g-linville g-linville requested a review from njhale August 10, 2024 15:13
server/app.mjs Outdated
const configPath = gptscriptConfigPath();

fs.readFile(configPath, 'utf8', (err, data) => {
fs.readFile(configPath, 'utf8', async (err, data) => {
Copy link
Member

Choose a reason for hiding this comment

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

We want initGPTScriptConfig to block server startup until the file is created. Won't switching this to async mean that initGPTScriptConfig can return before the file is created?

Copy link
Member Author

Choose a reason for hiding this comment

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

Idk but I'll remove it and handle everything with .then.

Signed-off-by: Grant Linville <grant@acorn.io>
Signed-off-by: Grant Linville <grant@acorn.io>
Signed-off-by: Grant Linville <grant@acorn.io>
@g-linville g-linville requested a review from njhale August 10, 2024 15:28
Signed-off-by: Grant Linville <grant@acorn.io>
@g-linville g-linville requested a review from njhale August 10, 2024 16:46
@g-linville g-linville merged commit 7af3594 into gptscript-ai:main Aug 10, 2024
@g-linville g-linville deleted the config-from-gh branch August 10, 2024 19:51
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.

2 participants