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

Support easy run daemon mode for Linux/MacOS #4245

Merged
merged 15 commits into from
Dec 26, 2023

Conversation

chenyukang
Copy link
Collaborator

@chenyukang chenyukang commented Nov 22, 2023

What problem does this PR solve?

Issue Number: close #4237

Problem Summary:

What is changed and how it works?

  • use crate daemonize for supporting daemon
  • use crate colored for better terminal UX
  • Note: new_global_runtime need to be invoked after daemonize success

Command line:

  • ckb run --daemon - run ckb in daemon
  • ckb daemon --check - check the status of service
  • ckb daemon --stop - stop the daemon process

What's Changed:

Related changes

  • PR to update owner/repo:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • Performance regression
  • Breaking backward compatibility

Release note

Title Only: Include only the PR title in the release note.

@chenyukang chenyukang requested a review from a team as a code owner November 22, 2023 16:17
@chenyukang chenyukang requested review from doitian and removed request for a team November 22, 2023 16:17
@chenyukang chenyukang force-pushed the yukang-daemon branch 2 times, most recently from 50d4e87 to c2e5ca1 Compare November 22, 2023 16:36
@eval-exec eval-exec added t:enhancement Type: Feature, refactoring. b:cli Break cli options and config file labels Nov 23, 2023
@chenyukang chenyukang changed the title Support easy run/miner daemon mode for Linux/MacOS Support easy run daemon mode for Linux/MacOS Nov 23, 2023
@chenyukang chenyukang force-pushed the yukang-daemon branch 2 times, most recently from f9c2b05 to 0b8e828 Compare November 24, 2023 15:34
Copy link
Member

@quake quake left a comment

Choose a reason for hiding this comment

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

a sentry log is printed when I run with ckb daemon --check, I think we should remove it:

       ckb : running      pid - 81683
2023-11-29 02:01:44.763 +00:00 main INFO sentry  sentry is disabled

ckb-bin/src/subcommand/daemon.rs Outdated Show resolved Hide resolved
ckb-bin/src/lib.rs Show resolved Hide resolved
ckb-bin/src/subcommand/daemon.rs Outdated Show resolved Hide resolved
ckb-bin/src/subcommand/daemon.rs Outdated Show resolved Hide resolved
@chenyukang
Copy link
Collaborator Author

a sentry log is printed when I run with ckb daemon --check, I think we should remove it:

       ckb : running      pid - 81683
2023-11-29 02:01:44.763 +00:00 main INFO sentry  sentry is disabled

Removed.

@chenyukang chenyukang enabled auto-merge December 12, 2023 09:03
@chenyukang chenyukang requested a review from quake December 18, 2023 03:38
auto-merge was automatically disabled December 18, 2023 12:07

Merge queue setting changed

@chenyukang chenyukang force-pushed the yukang-daemon branch 2 times, most recently from b81972e to 3dd1f72 Compare December 26, 2023 06:52
@chenyukang chenyukang added this pull request to the merge queue Dec 26, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 26, 2023
@chenyukang chenyukang enabled auto-merge December 26, 2023 08:53
@chenyukang chenyukang added this pull request to the merge queue Dec 26, 2023
Merged via the queue into nervosnetwork:develop with commit ae1ab00 Dec 26, 2023
31 checks passed
@doitian doitian mentioned this pull request Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:cli Break cli options and config file t:enhancement Type: Feature, refactoring.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Easy daemon mode for ckb run
4 participants