Skip to content

Commit

Permalink
logistics -> exporter, remove cutesy naming of lib
Browse files Browse the repository at this point in the history
  • Loading branch information
tommoor committed Feb 23, 2021
1 parent 04f9421 commit 2195787
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ please refer to the [architecture document](ARCHITECTURE.md) first for a high le
Outline uses [debug](https://www.npmjs.com/package/debug). To enable debugging output, the following categories are available:

```
DEBUG=sql,cache,presenters,events,logistics,emails,mailer
DEBUG=sql,cache,presenters,events,importer,exporter,emails,mailer
```

## Tests
Expand Down
2 changes: 1 addition & 1 deletion server/api/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import fs from "fs";
import Router from "koa-router";
import { ValidationError } from "../errors";
import { exportCollections } from "../logistics";
import { exportCollections } from "../exporter";
import auth from "../middlewares/authentication";
import {
Collection,
Expand Down
8 changes: 4 additions & 4 deletions server/logistics.js → server/exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import mailer from "./mailer";
import { Collection, Team } from "./models";
import { createQueue } from "./utils/queue";

const log = debug("logistics");
const logisticsQueue = createQueue("logistics");
const log = debug("exporter");
const exporterQueue = createQueue("exporter");
const queueOptions = {
attempts: 2,
removeOnComplete: true,
Expand Down Expand Up @@ -38,7 +38,7 @@ async function exportAndEmailCollections(teamId: string, email: string) {
});
}

logisticsQueue.process(async (job) => {
exporterQueue.process(async (job) => {
log("Process", job.data);

switch (job.data.type) {
Expand All @@ -49,7 +49,7 @@ logisticsQueue.process(async (job) => {
});

export const exportCollections = (teamId: string, email: string) => {
logisticsQueue.add(
exporterQueue.add(
{
type: "export-collections",
teamId,
Expand Down

0 comments on commit 2195787

Please sign in to comment.