IO-233 CDK Reformatting. First successful post.
This commit is contained in:
@@ -84,14 +84,6 @@ exports.default = async function (socket, { txEnvelope, jobid }) {
|
||||
"ERROR",
|
||||
`Error encountered in CdkJobExport. ${error}`
|
||||
);
|
||||
} finally {
|
||||
//Ensure we always insert logEvents
|
||||
//GQL to insert logevents.
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`Capturing log events to database.`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -183,6 +175,8 @@ async function CdkSelectedCustomer(socket, selectedCustomerId) {
|
||||
);
|
||||
|
||||
await MarkJobExported(socket, socket.JobData.id);
|
||||
|
||||
socket.emit("export-success", socket.JobData.id);
|
||||
} else {
|
||||
//Get the error code
|
||||
CdkBase.createLogEvent(
|
||||
@@ -209,7 +203,7 @@ async function CdkSelectedCustomer(socket, selectedCustomerId) {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
`Error(s) encountered in posting transaction. ${e}`
|
||||
r`Error(s) encountered in posting transaction. ${e}`
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -1224,7 +1218,11 @@ async function DeleteDmsWip(socket) {
|
||||
}
|
||||
|
||||
async function MarkJobExported(socket, jobid) {
|
||||
CdkBase.createLogEvent(socket, "DEBUG", `Querying job data for id ${jobid}`);
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`Marking job as exported for id ${jobid}`
|
||||
);
|
||||
const client = new GraphQLClient(process.env.GRAPHQL_ENDPOINT, {});
|
||||
const result = await client
|
||||
.setHeaders({ Authorization: `Bearer ${socket.handshake.auth.token}` })
|
||||
|
||||
Reference in New Issue
Block a user