@paralect/hive 0.0.16 → 0.0.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paralect/hive",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -51,14 +51,14 @@ class MongoQueryService {
51
51
  async findOne(query = {}, options = {}) {
52
52
  const { results } = await this.find(query, { limit: 2, ...options });
53
53
 
54
- if (results.length > 1) {
55
- throw new MongoServiceError(
56
- MongoServiceError.MORE_THAN_ONE,
57
- `findOne: More than one document return for query ${JSON.stringify(
58
- query
59
- )}`
60
- );
61
- }
54
+ // if (results.length > 1) {
55
+ // throw new MongoServiceError(
56
+ // MongoServiceError.MORE_THAN_ONE,
57
+ // `findOne: More than one document return for query ${JSON.stringify(
58
+ // query
59
+ // )}`
60
+ // );
61
+ // }
62
62
 
63
63
  return results[0] || null;
64
64
  }
@@ -3,7 +3,7 @@ const schedule = require("node-schedule");
3
3
 
4
4
  const requireDir = require("require-dir");
5
5
 
6
- requireDir("scheduler/handlers", {
6
+ requireDir(`${process.HIVE_SRC || "."}/scheduler/handlers`, {
7
7
  mapValue: (handler, handlerName) => {
8
8
  console.log(
9
9
  `[scheduler] Registering handler ${handlerName} with cron ${handler.cron}`