MCPcopy Create free account
hub / github.com/intelowlproject/IntelOwl / running

Method running

api_app/queryset.py:394–405  ·  view source on GitHub ↗

Filters jobs that are currently running. Returns: The filtered queryset.

(self, check_pending: bool = False, minutes_ago: int = 25)

Source from the content-addressed store, hash-verified

392 )
393
394 def running(self, check_pending: bool = False, minutes_ago: int = 25) -> "JobQuerySet":
395 """
396 Filters jobs that are currently running.
397
398 Returns:
399 The filtered queryset.
400 """
401 qs = self.exclude(status__in=[status.value for status in self.model.STATUSES.final_statuses()])
402 if not check_pending:
403 qs = qs.exclude(status=self.model.STATUSES.PENDING.value)
404 difference = now() - datetime.timedelta(minutes=minutes_ago)
405 return qs.filter(received_request_time__lte=difference)
406
407
408class ParameterQuerySet(CleanOnCreateQuerySet):

Callers 1

check_stuck_analysisFunction · 0.80

Calls 1

final_statusesMethod · 0.45

Tested by

no test coverage detected