chore: Move to prettier standard double quotes (#1309)
This commit is contained in:
@@ -1,31 +1,31 @@
|
||||
// @flow
|
||||
import debug from 'debug';
|
||||
import mailer from './mailer';
|
||||
import { Collection, Team } from './models';
|
||||
import { archiveCollections } from './utils/zip';
|
||||
import { createQueue } from './utils/queue';
|
||||
import debug from "debug";
|
||||
import mailer from "./mailer";
|
||||
import { Collection, Team } from "./models";
|
||||
import { archiveCollections } from "./utils/zip";
|
||||
import { createQueue } from "./utils/queue";
|
||||
|
||||
const log = debug('logistics');
|
||||
const logisticsQueue = createQueue('logistics');
|
||||
const log = debug("logistics");
|
||||
const logisticsQueue = createQueue("logistics");
|
||||
const queueOptions = {
|
||||
attempts: 2,
|
||||
removeOnComplete: true,
|
||||
backoff: {
|
||||
type: 'exponential',
|
||||
type: "exponential",
|
||||
delay: 60 * 1000,
|
||||
},
|
||||
};
|
||||
|
||||
async function exportAndEmailCollections(teamId: string, email: string) {
|
||||
log('Archiving team', teamId);
|
||||
log("Archiving team", teamId);
|
||||
const team = await Team.findByPk(teamId);
|
||||
const collections = await Collection.findAll({
|
||||
where: { teamId },
|
||||
order: [['name', 'ASC']],
|
||||
order: [["name", "ASC"]],
|
||||
});
|
||||
const filePath = await archiveCollections(collections);
|
||||
|
||||
log('Archive path', filePath);
|
||||
log("Archive path", filePath);
|
||||
|
||||
mailer.export({
|
||||
to: email,
|
||||
@@ -39,10 +39,10 @@ async function exportAndEmailCollections(teamId: string, email: string) {
|
||||
}
|
||||
|
||||
logisticsQueue.process(async job => {
|
||||
log('Process', job.data);
|
||||
log("Process", job.data);
|
||||
|
||||
switch (job.data.type) {
|
||||
case 'export-collections':
|
||||
case "export-collections":
|
||||
return await exportAndEmailCollections(job.data.teamId, job.data.email);
|
||||
default:
|
||||
}
|
||||
@@ -51,7 +51,7 @@ logisticsQueue.process(async job => {
|
||||
export const exportCollections = (teamId: string, email: string) => {
|
||||
logisticsQueue.add(
|
||||
{
|
||||
type: 'export-collections',
|
||||
type: "export-collections",
|
||||
teamId,
|
||||
email,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user