-
Notifications
You must be signed in to change notification settings - Fork 55
feat: Ingest API #1469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release53
Are you sure you want to change the base?
feat: Ingest API #1469
Changes from 44 commits
c26ed5f
73ef2e5
d279c78
92156b8
800d9fc
f97491b
51dbf86
defe14c
794d6ec
5ced41b
7398096
181a9ed
c1eea17
d271cca
7545052
0bd5b31
421f8db
019ac27
2a0408e
a08c570
d64b59e
92a9fdb
02cc75e
04900d7
0ce0f24
4480f08
5b585d4
532c5bd
703a458
4a872ee
0d05fbe
fc88a6f
568dc0e
4beb8de
095e39c
ffa0604
4b2ae3d
476b77c
fb7a560
1acaecb
828d64b
2b43bb3
5bc5b92
209035f
1d89ac3
65dcb24
35aef70
fc87125
5611679
4e48f4a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ [email protected] # Enable TypeScript syntax in .ts and .tsx modules | |
[email protected] # Meteor's client-side reactive programming library | ||
|
||
zodern:types | ||
fetch | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ jest.mock('nanoid', (...args) => require('./random').setup(args), { virtual: tru | |
|
||
// Add references to all "meteor" mocks below, so that jest resolves the imports properly. | ||
|
||
jest.mock('meteor/fetch', () => null, { virtual: true }) | ||
|
||
jest.mock('meteor/meteor', (...args) => require('./meteor').setup(args), { virtual: true }) | ||
jest.mock('meteor/random', (...args) => require('./random').setup(args), { virtual: true }) | ||
jest.mock('meteor/check', (...args) => require('./check').setup(args), { virtual: true }) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ import { PeripheralDeviceType } from '@sofie-automation/corelib/dist/dataModel/P | |
import { IngestJobs } from '@sofie-automation/corelib/dist/worker/ingest' | ||
import { assertNever } from '@sofie-automation/corelib/dist/lib' | ||
import { VerifiedRundownForUserAction } from '../../security/check' | ||
import { fetch } from 'meteor/fetch' | ||
import { logger } from '../../logging' | ||
|
||
/* | ||
This file contains actions that can be performed on an ingest-device | ||
|
@@ -27,6 +29,28 @@ export namespace IngestActions { | |
|
||
return TriggerReloadDataResponse.COMPLETED | ||
} | ||
case 'httpIngest': { | ||
const resyncUrl = rundown.source.resyncUrl | ||
fetch(resyncUrl, { method: 'POST' }) | ||
.then(() => { | ||
logger.info(`Reload rundown: resync request sent to "${resyncUrl}"`) | ||
}) | ||
.catch((error) => { | ||
if (error.errno === 'ECONNREFUSED') { | ||
|
||
logger.error( | ||
`Reload rundown: could not establish connection with "${resyncUrl}" (ECONNREFUSED)` | ||
) | ||
return | ||
} | ||
logger.error( | ||
`Reload rundown: error occured while sending resync request to "${resyncUrl}", error: "${JSON.stringify( | ||
error | ||
)}"` | ||
) | ||
}) | ||
|
||
return TriggerReloadDataResponse.WORKING | ||
} | ||
case 'testing': { | ||
await runIngestOperation(rundown.studioId, IngestJobs.CreateAdlibTestingRundownForShowStyleVariant, { | ||
showStyleVariantId: rundown.showStyleVariantId, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need this in
release53
?