psdev-task-manager 1.0.3 → 1.0.5
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/backend/tasks/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
...require('../tasksCollections'),
|
|
3
2
|
...require('./parentChildTasks'),
|
|
4
3
|
|
|
5
|
-
...require('./taskManager'),
|
|
6
4
|
...require('./consts'),
|
|
5
|
+
...require('./fieldTypeDetector'),
|
|
7
6
|
...require('./resultsSaver'),
|
|
7
|
+
...require('./taskManager'),
|
|
8
8
|
...require('./utils'),
|
|
9
|
-
...require('./fieldTypeDetector'),
|
|
10
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { withDuration } = require('
|
|
1
|
+
const { withDuration } = require('psdev-utils');
|
|
2
2
|
|
|
3
3
|
const { TASK_STATUS, CRON_JOB_MAX_DURATION_SEC } = require('./consts');
|
|
4
4
|
const { scheduleChildTasksAndUpdateParent } = require('./parentChildTasks/handler');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "psdev-task-manager",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Task manager library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"task-manager"
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@wix/data": "^1.0.273",
|
|
25
|
-
"@wix/essentials": "^0.1.27"
|
|
25
|
+
"@wix/essentials": "^0.1.27",
|
|
26
|
+
"psdev-utils": "1.0.2"
|
|
26
27
|
}
|
|
27
28
|
}
|
package/public/index.js
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
async function withDuration(functionName, func, logger) {
|
|
2
|
-
const start = Date.now();
|
|
3
|
-
const result = await func();
|
|
4
|
-
logger.log(
|
|
5
|
-
`${functionName} duration: ${
|
|
6
|
-
Date.now() - start
|
|
7
|
-
}ms and in human readble format: ${(Date.now() - start) / 1000} s`
|
|
8
|
-
);
|
|
9
|
-
return result;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
module.exports = {
|
|
13
|
-
withDuration,
|
|
14
|
-
};
|