9
9
10
10
from swf .constants import REGISTERED
11
11
from swf .querysets .base import BaseQuerySet
12
+ from swf .models import Domain
12
13
from swf .models .workflow import (WorkflowType , WorkflowExecution ,
13
14
CHILD_POLICIES )
14
15
from swf .utils import datetime_timestamp , past_day , get_subkey
@@ -437,7 +438,7 @@ def to_WorkflowExecution(self, domain, execution_info, **kwargs):
437
438
)
438
439
439
440
return WorkflowExecution (
440
- domain ,
441
+ Domain ( domain ) ,
441
442
get_subkey (execution_info , ['execution' , 'workflowId' ]), # workflow_id
442
443
run_id = get_subkey (execution_info , ['execution' , 'runId' ]),
443
444
workflow_type = workflow_type ,
@@ -545,7 +546,6 @@ def filter(self, domain=None,
545
546
"""
546
547
# As WorkflowTypeQuery has to be built against a specific domain
547
548
# name, domain filter is disposable, but not mandatory.
548
- domain = domain or self .domain .name
549
549
invalid_kwargs = self ._validate_status_parameters (status , kwargs )
550
550
551
551
if invalid_kwargs :
@@ -560,9 +560,14 @@ def filter(self, domain=None,
560
560
561
561
start_oldest_date = datetime_timestamp (past_day (oldest_date ))
562
562
return [self .to_WorkflowExecution (domain , wfe ) for wfe in
563
- self ._list_items (status ,
564
- domain ,
565
- start_oldest_date = int (start_oldest_date ))]
563
+ self ._list_items (
564
+ status ,
565
+ self .domain .name ,
566
+ * args ,
567
+ start_oldest_date = int (start_oldest_date ),
568
+ tag = tag ,
569
+ ** kwargs
570
+ )]
566
571
567
572
def _list (self , * args , ** kwargs ):
568
573
return self .list_workflow_executions (* args , ** kwargs )
0 commit comments