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

remove stale daemon pid in status check #3118

Merged
merged 2 commits into from
Jul 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions aiida/cmdline/commands/cmd_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def status(all_profiles):

for profile in profiles:
client = get_daemon_client(profile.name)
delete_stale_pid_file(client)
click.secho('Profile: ', fg='red', bold=True, nl=False)
click.secho('{}'.format(profile.name), bold=True)
result = get_daemon_status(client)
Expand Down
3 changes: 2 additions & 1 deletion aiida/cmdline/commands/cmd_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ServiceStatus(IntEnum):
def verdi_status():
"""Print status of AiiDA services."""
# pylint: disable=broad-except,too-many-statements
from aiida.cmdline.utils.daemon import get_daemon_status
from aiida.cmdline.utils.daemon import get_daemon_status, delete_stale_pid_file
from aiida.common.utils import Capturing, get_repository_folder
from aiida.manage.external.rmq import get_rmq_url
from aiida.manage.manager import get_manager
Expand Down Expand Up @@ -101,6 +101,7 @@ def verdi_status():
# getting the daemon status
try:
client = manager.get_daemon_client()
delete_stale_pid_file(client)
daemon_status = get_daemon_status(client)

daemon_status = daemon_status.split('\n')[0] # take only the first line
Expand Down