123123import org .apache .cloudstack .engine .subsystem .api .storage .TemplateState ;
124124import org .apache .cloudstack .framework .config .ConfigKey ;
125125import org .apache .cloudstack .framework .config .Configurable ;
126+ import org .apache .cloudstack .framework .jobs .impl .AsyncJobVO ;
126127import org .apache .cloudstack .query .QueryService ;
127128import org .apache .cloudstack .resourcedetail .dao .DiskOfferingDetailsDao ;
128129import org .apache .cloudstack .storage .datastore .db .PrimaryDataStoreDao ;
@@ -2483,6 +2484,7 @@ private Pair<List<AsyncJobJoinVO>, Integer> searchForAsyncJobsInternal(ListAsync
24832484
24842485 Filter searchFilter = new Filter (AsyncJobJoinVO .class , "id" , true , cmd .getStartIndex (), cmd .getPageSizeVal ());
24852486 SearchBuilder <AsyncJobJoinVO > sb = _jobJoinDao .createSearchBuilder ();
2487+ sb .and ("instanceTypeNEQ" , sb .entity ().getInstanceType (), SearchCriteria .Op .NEQ );
24862488 sb .and ("accountIdIN" , sb .entity ().getAccountId (), SearchCriteria .Op .IN );
24872489 boolean accountJoinIsDone = false ;
24882490 if (permittedAccounts .isEmpty () && domainId != null ) {
@@ -2509,6 +2511,7 @@ private Pair<List<AsyncJobJoinVO>, Integer> searchForAsyncJobsInternal(ListAsync
25092511 Object startDate = cmd .getStartDate ();
25102512
25112513 SearchCriteria <AsyncJobJoinVO > sc = sb .create ();
2514+ sc .setParameters ("instanceTypeNEQ" , AsyncJobVO .PSEUDO_JOB_INSTANCE_TYPE );
25122515 if (listProjectResourcesCriteria != null ) {
25132516 sc .setParameters ("type" , Account .Type .PROJECT );
25142517 }
0 commit comments