mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 08:37:48 -02:30
make jobs_running more rich in OPTIONS
* Expose jobs_running as an IntegerField
This commit is contained in:
@@ -85,6 +85,10 @@ class Instance(models.Model):
|
||||
# NOTE: TODO: Likely to repurpose this once standalone ramparts are a thing
|
||||
return "awx"
|
||||
|
||||
@property
|
||||
def jobs_running(self):
|
||||
return UnifiedJob.objects.filter(execution_node=self.hostname, status__in=('running', 'waiting',)).count()
|
||||
|
||||
def is_lost(self, ref_time=None, isolated=False):
|
||||
if ref_time is None:
|
||||
ref_time = now()
|
||||
|
||||
Reference in New Issue
Block a user