Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add config reload api #220

Merged
merged 1 commit into from
Dec 25, 2023
Merged

add config reload api #220

merged 1 commit into from
Dec 25, 2023

Conversation

ibigbug
Copy link
Member

@ibigbug ibigbug commented Dec 25, 2023

🤔 This is a ...

  • New feature
  • Bug fix
  • Performance optimization
  • Enhancement feature
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

#191

💡 Background and solution

📝 Changelog

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Changelog is provided or not needed

@ibigbug
Copy link
Member Author

ibigbug commented Dec 25, 2023

@greenhat616

@ibigbug ibigbug marked this pull request as ready for review December 25, 2023 16:46
@ibigbug ibigbug merged commit 73fe07e into master Dec 25, 2023
5 checks passed
@ibigbug ibigbug deleted the hot-reload branch December 25, 2023 18:02
@greenhat616
Copy link
Collaborator

I tested it with nyanpasu dev, and server returned a 202(Accepted) error.

I think it should be blocking until the config refreshed, just as the meta does?
https://github.com/MetaCubeX/mihomo/blob/Alpha/hub/route/configs.go

@ibigbug
Copy link
Member Author

ibigbug commented Dec 25, 2023

is the config actually reloaded?

202 is not an error, and i think it shouldn't matter if this API is blocking/async. the other clash i think it returns 204 instead

@greenhat616
Copy link
Collaborator

is the config actually reloaded?

202 is not an error, and i think it shouldn't matter if this API is blocking/async. the other clash i think it returns 204 instead

Yes, I know it is intentional. It was caught by frontend request lib, such as axios or fetch. I can process it manually in next patch of nyanpasu. But users counld not get switch profiles until updates get released, though we have a core updater.

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