SAAS-868 - Refactor third party + celery workflow, implement locking on TaskManager
This commit is contained in:
parent
3902c8c746
commit
8d2e476ff1
34 changed files with 4302 additions and 1143 deletions
|
@ -127,6 +127,7 @@ class CcFilesTableMap extends TableMap
|
|||
$this->addRelation('CcBlockcontents', 'CcBlockcontents', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcBlockcontentss');
|
||||
$this->addRelation('CcSchedule', 'CcSchedule', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcSchedules');
|
||||
$this->addRelation('CcPlayoutHistory', 'CcPlayoutHistory', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'CcPlayoutHistorys');
|
||||
$this->addRelation('ThirdPartyTrackReferences', 'ThirdPartyTrackReferences', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'ThirdPartyTrackReferencess');
|
||||
} // buildRelations()
|
||||
|
||||
} // CcFilesTableMap
|
||||
|
|
|
@ -51,7 +51,6 @@ class CcPlayoutHistoryTemplateTableMap extends TableMap
|
|||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcPlayoutHistoryTemplateField', 'CcPlayoutHistoryTemplateField', RelationMap::ONE_TO_MANY, array('id' => 'template_id', ), 'CASCADE', null, 'CcPlayoutHistoryTemplateFields');
|
||||
$this->addRelation('ThirdPartyTrackReferences', 'ThirdPartyTrackReferences', RelationMap::ONE_TO_MANY, array('id' => 'file_id', ), 'CASCADE', null, 'ThirdPartyTrackReferencess');
|
||||
} // buildRelations()
|
||||
|
||||
} // CcPlayoutHistoryTemplateTableMap
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This class defines the structure of the 'celery_tasks' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* This map class is used by Propel to do runtime db structure discovery.
|
||||
* For example, the createSelectSql() method checks the type of a given column used in an
|
||||
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
|
||||
* (i.e. if it's a text column type).
|
||||
*
|
||||
* @package propel.generator.airtime.map
|
||||
*/
|
||||
class CeleryTasksTableMap extends TableMap
|
||||
{
|
||||
|
||||
/**
|
||||
* The (dot-path) name of this class
|
||||
*/
|
||||
const CLASS_NAME = 'airtime.map.CeleryTasksTableMap';
|
||||
|
||||
/**
|
||||
* Initialize the table attributes, columns and validators
|
||||
* Relations are not initialized by this method since they are lazy loaded
|
||||
*
|
||||
* @return void
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function initialize()
|
||||
{
|
||||
// attributes
|
||||
$this->setName('celery_tasks');
|
||||
$this->setPhpName('CeleryTasks');
|
||||
$this->setClassname('CeleryTasks');
|
||||
$this->setPackage('airtime');
|
||||
$this->setUseIdGenerator(false);
|
||||
// columns
|
||||
$this->addPrimaryKey('id', 'DbId', 'VARCHAR', true, 256, null);
|
||||
$this->addForeignKey('track_reference', 'DbTrackReference', 'INTEGER', 'third_party_track_references', 'id', true, null, null);
|
||||
$this->addColumn('name', 'DbName', 'VARCHAR', false, 256, null);
|
||||
$this->addColumn('dispatch_time', 'DbDispatchTime', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('status', 'DbStatus', 'VARCHAR', true, 256, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
* Build the RelationMap objects for this table relationships
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('ThirdPartyTrackReferences', 'ThirdPartyTrackReferences', RelationMap::MANY_TO_ONE, array('track_reference' => 'id', ), 'CASCADE', null);
|
||||
} // buildRelations()
|
||||
|
||||
} // CeleryTasksTableMap
|
|
@ -42,11 +42,9 @@ class ThirdPartyTrackReferencesTableMap extends TableMap
|
|||
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
|
||||
$this->addColumn('service', 'DbService', 'VARCHAR', true, 256, null);
|
||||
$this->addColumn('foreign_id', 'DbForeignId', 'VARCHAR', false, 256, null);
|
||||
$this->addColumn('broker_task_id', 'DbBrokerTaskId', 'VARCHAR', false, 256, null);
|
||||
$this->addColumn('broker_task_name', 'DbBrokerTaskName', 'VARCHAR', false, 256, null);
|
||||
$this->addColumn('broker_task_dispatch_time', 'DbBrokerTaskDispatchTime', 'TIMESTAMP', false, null, null);
|
||||
$this->addForeignKey('file_id', 'DbFileId', 'INTEGER', 'cc_playout_history_template', 'id', true, null, null);
|
||||
$this->addColumn('status', 'DbStatus', 'VARCHAR', true, 256, null);
|
||||
$this->addForeignKey('file_id', 'DbFileId', 'INTEGER', 'cc_files', 'id', true, null, null);
|
||||
$this->addColumn('upload_time', 'DbUploadTime', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('status', 'DbStatus', 'VARCHAR', false, 256, null);
|
||||
// validators
|
||||
} // initialize()
|
||||
|
||||
|
@ -55,7 +53,8 @@ class ThirdPartyTrackReferencesTableMap extends TableMap
|
|||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CcPlayoutHistoryTemplate', 'CcPlayoutHistoryTemplate', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CcFiles', 'CcFiles', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'CASCADE', null);
|
||||
$this->addRelation('CeleryTasks', 'CeleryTasks', RelationMap::ONE_TO_MANY, array('id' => 'track_reference', ), 'CASCADE', null, 'CeleryTaskss');
|
||||
} // buildRelations()
|
||||
|
||||
} // ThirdPartyTrackReferencesTableMap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue