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

Automatically Start Server for Detail Commands #51

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

saikiranAnnam
Copy link
Collaborator

Description:

This pull request fixes the issue where the detail command does not automatically start the Geoweaver server if it's not already running. With this update, the server will automatically start if it is not running when executing the following detail subcommands: workflow, process, host, or get_process_code.

Code Changes:

  1. Added ensure_server_running Function:

    • Ensures the Geoweaver server is running before executing any detail command.
    • Starts the server based on the user's operating system (Windows, macOS, or Linux).
    • Includes parameters for forced server restart or jar download (force_restart and force_download).
  2. Integrated ensure_server_running Across Detail Subcommands:

    • detail_workflow, detail_process, detail_host, and get_process_code now call ensure_server_running before proceeding with their respective logic. This ensures the server is up and running before performing other operations.

Testing Results:

  • Tested the changes in a local macOS environment. Below are the results of the test commands executed:
    1. Stop server and list processes:
      • Command: gw stop
      • Command: gw list process
      • Output: Successfully stopped Geoweaver and listed processes without issues.
    2. Start server automatically via detail command:
      • Command: gw detail code z56pry
      • Output: Successfully started the Geoweaver server and displayed the process details.
    3. Get host details via detail command:
      • Command: gw detail host 100001
      • Output: The server started automatically, and host details were retrieved successfully.

Request for Testing:

Please test the following scenarios to ensure full functionality and compatibility:

  1. Execute detail commands (e.g., gw detail workflow, gw detail process) without the server running, to verify that the server starts automatically.
  2. Test with force_restart=True and force_download=True, to ensure the server is correctly reinitialized when these parameters are used.
  3. Confirm compatibility across Windows, macOS, and Linux to ensure cross-platform functionality.

@JYOSHREDDY JYOSHREDDY self-requested a review December 18, 2024 20:44
Copy link
Collaborator

@JYOSHREDDY JYOSHREDDY left a comment

Choose a reason for hiding this comment

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

gw detail code z56pry, isn't working. Please check once.

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