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

refactor: optimize starting container #1029

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ComixHe
Copy link
Collaborator

@ComixHe ComixHe commented Feb 26, 2025

No description provided.

@ComixHe ComixHe requested a review from dengbo11 February 26, 2025 08:39
@ComixHe ComixHe changed the title refactor: optimize staring container refactor: optimize starting container Feb 26, 2025
@ComixHe ComixHe requested review from myml and reddevillg February 26, 2025 09:42

auto ret = QMetaObject::invokeMethod(
QCoreApplication::instance(),
[&commandParser, &noDBus, &jsonFlag, &options, &config, &clientFactory]() {
[&commandParser,
noDBus = !!*noDBusFlag,
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里为什么用两个!!

const auto defaultRepo = linglong::repo::getDefaultRepo(*config);
linglong::repo::ClientFactory clientFactory(defaultRepo.url);

auto defaultRepo = linglong::repo::getDefaultRepo(*config);
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里把const去掉就为了下面传递url吗?是不是不太值得

this->printer.printErr(LINGLONG_ERRV(msg));
return false;
}
stream << nlohmann::json(stateInfo).dump();
stream << nlohmann::json(linglong::api::types::v1::ContainerProcessStateInfo{
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里少了一个dump没问题吧?

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