@loggerjs/node 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1038,12 +1038,18 @@ function queueName(args, fallback) {
1038
1038
  const first = args[0];
1039
1039
  return typeof first === "string" ? first : fallback;
1040
1040
  }
1041
+ function operationFor(method) {
1042
+ if (method === "process") return "consume";
1043
+ if (method === "add" || method === "addBulk") return "publish";
1044
+ return "other";
1045
+ }
1041
1046
  function bullMqIntegration(options) {
1042
1047
  return queueIntegration({
1043
1048
  ...options,
1044
1049
  name: options.name ?? "bullmq",
1045
1050
  system: "bullmq",
1046
1051
  methods: options.methods ?? bullMqMethods,
1052
+ getOperation: options.getOperation ?? operationFor,
1047
1053
  queueName: options.queueName ?? options.client.name,
1048
1054
  getQueueName: (args) => queueName(args, options.queueName ?? options.client.name)
1049
1055
  });