Skip to content

Commit

Permalink
retrieve clusterid column from DB. Fix dmwm#8900
Browse files Browse the repository at this point in the history
  • Loading branch information
belforte committed Jan 29, 2025
1 parent 5bdfcbf commit b07faf2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/python/TaskWorker/Actions/DagmanKiller.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from urllib.parse import urlencode

import HTCondorLocator
from ServerUtilities import FEEDBACKMAIL
from ServerUtilities import getColumn, FEEDBACKMAIL

from TaskWorker.DataObjects import Result
from TaskWorker.Actions.TaskAction import TaskAction
from TaskWorker.WorkerExceptions import TaskWorkerException
Expand Down Expand Up @@ -39,7 +40,11 @@ def executeInternal(self, *args, **kwargs): # pylint: disable=unused-argument
raise ValueError("No proxy provided")
self.proxy = self.task['user_proxy'] # pylint: disable=attribute-defined-outside-init

if not self.task['tw_name'] or not self.task['clusterid']:
# retrieve full task info to assess if it is in a "killable" status
data = {'subresource': 'search', 'workflow': self.workflow}
dictresult, _, _ = self.crabserver.get(api='task', data=data)

if not getColumn(dictresult, 'tw_name') or not getColumn(dictresult, 'clusterid'):
self.logger.info("Task %s was not submitted to HTCondor scheduler yet", self.workflow)
return

Expand Down

0 comments on commit b07faf2

Please sign in to comment.