Worker build updates
This commit is contained in:
parent
45c80ca98a
commit
0cf1c3b8fd
64 changed files with 4216 additions and 3450 deletions
1
apps/bridge-worker/crontab
Normal file
1
apps/bridge-worker/crontab
Normal file
|
|
@ -0,0 +1 @@
|
|||
*/1 * * * * fetch-signal-messages
|
||||
|
|
@ -14,7 +14,7 @@ const startWorker = async () => {
|
|||
noHandleSignals: false,
|
||||
pollInterval: 1000,
|
||||
taskDirectory: `${__dirname}/tasks`,
|
||||
// crontabFile: `${__dirname}/crontab`,
|
||||
crontabFile: `${__dirname}/crontab`,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,12 +19,13 @@ const notifyWebhooksTask = async (
|
|||
for (const webhook of webhooks) {
|
||||
const { endpointUrl, httpMethod, headers } = webhook;
|
||||
const finalHeaders = { "Content-Type": "application/json", ...headers };
|
||||
|
||||
await fetch(endpointUrl, {
|
||||
console.log({ endpointUrl, httpMethod, headers, finalHeaders });
|
||||
const result = await fetch(endpointUrl, {
|
||||
method: httpMethod,
|
||||
headers: finalHeaders,
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
console.log(result);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"extends": "@link-stack/typescript-config/tsconfig.json",
|
||||
"extends": "@link-stack/typescript-config/tsconfig.node.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "build/main"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue