Commit 6cbd7b56 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Minor code style issues.

parent b20dab40
Pipeline #45330 passed with stages
in 24 minutes and 48 seconds
......@@ -18,7 +18,6 @@ import sys
import click
import asyncio
from concurrent.futures import ProcessPoolExecutor
from celery.task.control import revoke
from mongoengine import Q
from nomad import config, infrastructure, processing, utils
......@@ -30,6 +29,7 @@ from .main import cli
def proc():
@proc.command(help='List processing tasks')
def ls():
......@@ -44,6 +44,7 @@ def ls():
@proc.command(help='Stop all running processing')
@click.option('--calcs', is_flag=True, help='Only stop calculation processing')
@click.option('--kill', is_flag=True, help='Use the kill signal and force task failure')
......@@ -66,14 +67,14 @@ def stop_all(calcs: bool, kill: bool):
kwargs = {}
if kill:
revoke(proc.celery_task_id, terminate=True, **kwargs), terminate=True, **kwargs)
if kill:
'fail proc', celery_task_id=proc.celery_task_id, kill=kill,
**logger_kwargs)'process terminate via nomad cli')
proc.process_status = processing.PROCESS_COMPLETED
query = Q(process_status=processing.PROCESS_RUNNING) | Q(tasks_status=processing.RUNNING)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment