feat: Job Scheduling (#3927)

* Adds back _JobSchedule as volatile class

* wip

* Restores jobs endpoints for creation, update and deletion

* Adds tests

* Fixes postgres tests

* Enforce jobName exists before creating a schedule
This commit is contained in:
Florent Vilmart
2017-06-14 13:07:00 -04:00
committed by GitHub
parent 9256b2d7e6
commit f0949a1310
5 changed files with 284 additions and 15 deletions

View File

@@ -667,7 +667,7 @@ export class PostgresStorageAdapter {
const joins = results.reduce((list, schema) => {
return list.concat(joinTablesForSchema(schema.schema));
}, []);
const classes = ['_SCHEMA','_PushStatus','_JobStatus','_Hooks','_GlobalConfig', ...results.map(result => result.className), ...joins];
const classes = ['_SCHEMA','_PushStatus','_JobStatus','_JobSchedule','_Hooks','_GlobalConfig', ...results.map(result => result.className), ...joins];
return this._client.tx(t=>t.batch(classes.map(className=>t.none('DROP TABLE IF EXISTS $<className:name>', { className }))));
}, error => {
if (error.code === PostgresRelationDoesNotExistError) {