SAAS-868 - Refactor third party + celery workflow, implement locking on TaskManager

This commit is contained in:
Duncan Sommerville 2015-06-16 15:10:08 -04:00
parent 3902c8c746
commit 8d2e476ff1
34 changed files with 4302 additions and 1143 deletions

View file

@ -190,6 +190,10 @@
* @method CcFilesQuery rightJoinCcPlayoutHistory($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CcPlayoutHistory relation
* @method CcFilesQuery innerJoinCcPlayoutHistory($relationAlias = null) Adds a INNER JOIN clause to the query using the CcPlayoutHistory relation
*
* @method CcFilesQuery leftJoinThirdPartyTrackReferences($relationAlias = null) Adds a LEFT JOIN clause to the query using the ThirdPartyTrackReferences relation
* @method CcFilesQuery rightJoinThirdPartyTrackReferences($relationAlias = null) Adds a RIGHT JOIN clause to the query using the ThirdPartyTrackReferences relation
* @method CcFilesQuery innerJoinThirdPartyTrackReferences($relationAlias = null) Adds a INNER JOIN clause to the query using the ThirdPartyTrackReferences relation
*
* @method CcFiles findOne(PropelPDO $con = null) Return the first CcFiles matching the query
* @method CcFiles findOneOrCreate(PropelPDO $con = null) Return the first CcFiles matching the query, or a new CcFiles object populated from the query conditions when no match is found
*
@ -3509,6 +3513,80 @@ abstract class BaseCcFilesQuery extends ModelCriteria
->useQuery($relationAlias ? $relationAlias : 'CcPlayoutHistory', 'CcPlayoutHistoryQuery');
}
/**
* Filter the query by a related ThirdPartyTrackReferences object
*
* @param ThirdPartyTrackReferences|PropelObjectCollection $thirdPartyTrackReferences the related object to use as filter
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
* @throws PropelException - if the provided filter is invalid.
*/
public function filterByThirdPartyTrackReferences($thirdPartyTrackReferences, $comparison = null)
{
if ($thirdPartyTrackReferences instanceof ThirdPartyTrackReferences) {
return $this
->addUsingAlias(CcFilesPeer::ID, $thirdPartyTrackReferences->getDbFileId(), $comparison);
} elseif ($thirdPartyTrackReferences instanceof PropelObjectCollection) {
return $this
->useThirdPartyTrackReferencesQuery()
->filterByPrimaryKeys($thirdPartyTrackReferences->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterByThirdPartyTrackReferences() only accepts arguments of type ThirdPartyTrackReferences or PropelCollection');
}
}
/**
* Adds a JOIN clause to the query using the ThirdPartyTrackReferences relation
*
* @param string $relationAlias optional alias for the relation
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function joinThirdPartyTrackReferences($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('ThirdPartyTrackReferences');
// create a ModelJoin object for this join
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
if ($previousJoin = $this->getPreviousJoin()) {
$join->setPreviousJoin($previousJoin);
}
// add the ModelJoin to the current object
if ($relationAlias) {
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
$this->addJoinObject($join, $relationAlias);
} else {
$this->addJoinObject($join, 'ThirdPartyTrackReferences');
}
return $this;
}
/**
* Use the ThirdPartyTrackReferences relation ThirdPartyTrackReferences object
*
* @see useQuery()
*
* @param string $relationAlias optional alias for the relation,
* to be used as main alias in the secondary query
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
*
* @return ThirdPartyTrackReferencesQuery A secondary query class using the current class as primary query
*/
public function useThirdPartyTrackReferencesQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinThirdPartyTrackReferences($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'ThirdPartyTrackReferences', 'ThirdPartyTrackReferencesQuery');
}
/**
* Exclude object from result
*