fix(core): update

This commit is contained in:
Philipp Kunz 2023-08-15 11:39:31 +02:00
parent aa632a5294
commit bd6109d5ea
6 changed files with 82 additions and 56 deletions

View File

@ -29,13 +29,13 @@
},
"homepage": "https://gitlab.com/pushrocks/taskbuffer#readme",
"dependencies": {
"@push.rocks/isounique": "^1.0.5",
"@push.rocks/lik": "^6.0.3",
"@push.rocks/lik": "^6.0.5",
"@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartlog": "^3.0.3",
"@push.rocks/smartpromise": "^4.0.3",
"@push.rocks/smartrx": "^3.0.6",
"@push.rocks/smarttime": "^4.0.4"
"@push.rocks/smarttime": "^4.0.5",
"@push.rocks/smartunique": "^3.0.6"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.66",
@ -43,7 +43,7 @@
"@gitzone/tsrun": "^1.2.44",
"@gitzone/tstest": "^1.0.77",
"@push.rocks/tapbundle": "^5.0.15",
"@types/node": "^20.4.10"
"@types/node": "^20.5.0"
},
"files": [
"ts/**/*",

View File

@ -5,12 +5,9 @@ settings:
excludeLinksFromLockfile: false
dependencies:
'@push.rocks/isounique':
specifier: ^1.0.5
version: 1.0.5
'@push.rocks/lik':
specifier: ^6.0.3
version: 6.0.3
specifier: ^6.0.5
version: 6.0.5
'@push.rocks/smartdelay':
specifier: ^3.0.5
version: 3.0.5
@ -24,8 +21,11 @@ dependencies:
specifier: ^3.0.6
version: 3.0.6
'@push.rocks/smarttime':
specifier: ^4.0.4
version: 4.0.4
specifier: ^4.0.5
version: 4.0.5
'@push.rocks/smartunique':
specifier: ^3.0.6
version: 3.0.6
devDependencies:
'@gitzone/tsbuild':
@ -36,16 +36,16 @@ devDependencies:
version: 2.0.8
'@gitzone/tsrun':
specifier: ^1.2.44
version: 1.2.44(@types/node@20.4.10)
version: 1.2.44(@types/node@20.5.0)
'@gitzone/tstest':
specifier: ^1.0.77
version: 1.0.77(@types/node@20.4.10)(sinon@15.2.0)
version: 1.0.77(@types/node@20.5.0)(sinon@15.2.0)
'@push.rocks/tapbundle':
specifier: ^5.0.15
version: 5.0.15(sinon@15.2.0)
'@types/node':
specifier: ^20.4.10
version: 20.4.10
specifier: ^20.5.0
version: 20.5.0
packages:
@ -398,13 +398,13 @@ packages:
- supports-color
dev: true
/@gitzone/tsrun@1.2.44(@types/node@20.4.10):
/@gitzone/tsrun@1.2.44(@types/node@20.5.0):
resolution: {integrity: sha512-7AfL9u+TmD7gLiRaTCimhWm5rq9GGBQnOF4q1FnFh2CAb1FbK5fzUVbj6wo3zGS2H+MSm6dqFA6mvdBI1ox0mQ==}
hasBin: true
dependencies:
'@push.rocks/smartfile': 10.0.28
'@push.rocks/smartshell': 3.0.3
ts-node: 10.9.1(@types/node@20.4.10)(typescript@5.1.6)
ts-node: 10.9.1(@types/node@20.5.0)(typescript@5.1.6)
typescript: 5.1.6
transitivePeerDependencies:
- '@swc/core'
@ -413,13 +413,13 @@ packages:
- supports-color
dev: true
/@gitzone/tstest@1.0.77(@types/node@20.4.10)(sinon@15.2.0):
/@gitzone/tstest@1.0.77(@types/node@20.5.0)(sinon@15.2.0):
resolution: {integrity: sha512-YzBXnNqkYOiFf8xAA+m8owblrmAut8ukINghYy4DXoUR+5g1IKrpTjK4A8HzIsvVsQRyHPsQ2YFtsk+utqdivQ==}
hasBin: true
dependencies:
'@apiglobal/typedserver': 2.0.65
'@gitzone/tsbundle': 2.0.8
'@gitzone/tsrun': 1.2.44(@types/node@20.4.10)
'@gitzone/tsrun': 1.2.44(@types/node@20.5.0)
'@push.rocks/consolecolor': 2.0.1
'@push.rocks/smartbrowser': 2.0.5
'@push.rocks/smartdelay': 3.0.5
@ -582,14 +582,14 @@ packages:
/@push.rocks/isounique@1.0.5:
resolution: {integrity: sha512-Z0BVqZZOCif1THTbIKWMgg0wxCzt9CyBtBBqQJiZ+jJ0KlQFrQHNHrPt81/LXe/L4x0cxWsn0bpL6W5DNSvNLw==}
/@push.rocks/lik@6.0.3:
resolution: {integrity: sha512-YPA2PfubtD6YSWo5AXx8J10ZbEMkGezrBw93+2jq7ASSNnmGnXYMNuCOnfj+ZLqT7mT0cQOaUxmfyBKF1gG+ng==}
/@push.rocks/lik@6.0.5:
resolution: {integrity: sha512-rDSPVknpJDcY3yx4w3lNQfpRkBRuxYVIJKrkiODdH27X0z3+XU4e/iAWKySuLq6H7dAoxSHJDf6BrCO+3Y8kcw==}
dependencies:
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartmatch': 2.0.0
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smartrx': 3.0.6
'@push.rocks/smarttime': 4.0.4
'@push.rocks/smarttime': 4.0.5
'@types/minimatch': 5.1.2
'@types/symbol-tree': 3.2.2
symbol-tree: 3.2.4
@ -634,7 +634,7 @@ packages:
/@push.rocks/smartfile@10.0.28:
resolution: {integrity: sha512-Bza5xwJuXGeIokr9xeLx1LSGuXvIYLtJimz0X6lB2Sv2kurlIjpb+/ix4KqsG9eBhvzo6ncqqjgnLAUyUQQjfw==}
dependencies:
'@push.rocks/lik': 6.0.3
'@push.rocks/lik': 6.0.5
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartfile-interfaces': 1.0.7
'@push.rocks/smarthash': 3.0.2
@ -742,10 +742,10 @@ packages:
through2: 4.0.2
dev: true
/@push.rocks/smarttime@4.0.4:
resolution: {integrity: sha512-PTYxvl6Rr5eSOKPbB0S5+ym6z6zfI/e1wqmVxX8QjnZ5ZIvhGfAoCZ7sie+Zd4OJ4nCG8UClgk5LrFaN3zUnZA==}
/@push.rocks/smarttime@4.0.5:
resolution: {integrity: sha512-vf0Jh+jnMt59l4zbmxdkoPdIMhtO5ghFQn8wn9hX+oOtog56ddrwvdubs9CtDNCPoA8YEKL8Izp1uY21NIgrmA==}
dependencies:
'@push.rocks/lik': 6.0.3
'@push.rocks/lik': 6.0.5
'@push.rocks/smartdelay': 3.0.5
'@push.rocks/smartpromise': 4.0.3
croner: 5.7.0
@ -753,6 +753,14 @@ packages:
is-nan: 1.3.2
pretty-ms: 8.0.0
/@push.rocks/smartunique@3.0.6:
resolution: {integrity: sha512-/fvh5BBHiTvZcCH4km2Oh3f0spfcWKr7e0Dp6lAb3rJq+5KiO7fQmI1UcQ9clADUaaJOn8sPzseiLt+kJ2tajw==}
dependencies:
'@types/uuid': 9.0.2
nanoid: 4.0.2
uuid: 9.0.0
dev: false
/@push.rocks/smarturl@3.0.7:
resolution: {integrity: sha512-nx4EWjQD9JeO7QVbOsxd1PFeDQYoSQOOOYCZ+r7QWXHLJG52iYzgvJDCQyX6p705HDkYMJWozW2ZzhR22qLKbw==}
dev: true
@ -765,7 +773,7 @@ packages:
'@push.rocks/smartenv': 5.0.5
'@push.rocks/smartexpect': 1.0.21
'@push.rocks/smartpromise': 4.0.3
'@push.rocks/smarttime': 4.0.4
'@push.rocks/smarttime': 4.0.5
transitivePeerDependencies:
- bufferutil
- sinon
@ -1476,7 +1484,7 @@ packages:
/@types/accepts@1.3.5:
resolution: {integrity: sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/babel__code-frame@7.0.3:
@ -1487,7 +1495,7 @@ packages:
resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==}
dependencies:
'@types/connect': 3.4.35
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/buffer-json@2.0.1:
@ -1514,14 +1522,14 @@ packages:
/@types/clean-css@4.2.6:
resolution: {integrity: sha512-Ze1tf+LnGPmG6hBFMi0B4TEB0mhF7EiMM5oyjLDNPE9hxrPU0W+5+bHvO+eFPA+bt0iC1zkQMoU/iGdRVjcRbw==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
source-map: 0.6.1
dev: true
/@types/co-body@6.1.0:
resolution: {integrity: sha512-3e0q2jyDAnx/DSZi0z2H0yoZ2wt5yRDZ+P7ymcMObvq0ufWRT4tsajyO+Q1VwVWiv9PRR4W3YEjEzBjeZlhF+w==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
'@types/qs': 6.9.7
dev: true
@ -1534,7 +1542,7 @@ packages:
/@types/connect@3.4.35:
resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/content-disposition@0.5.5:
@ -1555,13 +1563,13 @@ packages:
'@types/connect': 3.4.35
'@types/express': 4.17.17
'@types/keygrip': 1.0.2
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/cors@2.8.13:
resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/debounce@1.2.1:
@ -1575,7 +1583,7 @@ packages:
/@types/express-serve-static-core@4.17.35:
resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
'@types/qs': 6.9.7
'@types/range-parser': 1.2.4
'@types/send': 0.17.1
@ -1593,27 +1601,27 @@ packages:
/@types/finalhandler@1.2.0:
resolution: {integrity: sha512-NgEZKOhxUSXkwNnWNaMXZaopQ5aFGPAYiEpEWIkQ6Dzc4iS0M1oQsvWne2t+ex9QZUAdTz/ZT4tOXJhWtP6mCw==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/from2@2.3.2:
resolution: {integrity: sha512-s1pdctxW2+CA4FOxxTBRxC3RKQL9Br1a2s2LngP4jh1BI84JBL3mDXj87EwcckN9z/IXp8o3ySmvZveGEAAwqw==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/fs-extra@11.0.1:
resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==}
dependencies:
'@types/jsonfile': 6.1.1
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/glob@8.1.0:
resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
dependencies:
'@types/minimatch': 5.1.2
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/html-minifier@4.0.2:
@ -1663,7 +1671,7 @@ packages:
/@types/jsonfile@6.1.1:
resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/keygrip@1.0.2:
@ -1686,7 +1694,7 @@ packages:
'@types/http-errors': 2.0.1
'@types/keygrip': 1.0.2
'@types/koa-compose': 3.2.5
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/mime-types@2.1.1:
@ -1712,8 +1720,8 @@ packages:
resolution: {integrity: sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==}
dev: true
/@types/node@20.4.10:
resolution: {integrity: sha512-vwzFiiy8Rn6E0MtA13/Cxxgpan/N6UeNYR9oUu6kuJWxu6zCk98trcDp8CBhbtaeuq9SykCmXkFr2lWLoPcvLg==}
/@types/node@20.5.0:
resolution: {integrity: sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==}
dev: true
/@types/parse5@6.0.3:
@ -1744,7 +1752,7 @@ packages:
resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==}
dependencies:
'@types/mime': 1.3.2
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/serve-static@1.15.2:
@ -1752,7 +1760,7 @@ packages:
dependencies:
'@types/http-errors': 2.0.1
'@types/mime': 3.0.1
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/shortid@0.0.29:
@ -1782,7 +1790,7 @@ packages:
/@types/through2@2.0.38:
resolution: {integrity: sha512-YFu+nHmjxMurkH1BSzA0Z1WrKDAY8jUKPZctNQn7mc+/KKtp2XxnclHFXxdB1m7Iqnzb5aywgP8TMK283LezGQ==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/trusted-types@2.0.3:
@ -1799,6 +1807,10 @@ packages:
resolution: {integrity: sha512-hKB88y3YHL8oPOs/CNlaXtjWn93+Bs48sDQR37ZUqG2tLeCS7EA1cmnkKsuQsub9OKEB/y/Rw9zqJqqNSbqVlQ==}
dev: true
/@types/uuid@9.0.2:
resolution: {integrity: sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==}
dev: false
/@types/which@2.0.2:
resolution: {integrity: sha512-113D3mDkZDjo+EeUEHCFy0qniNc1ZpecGiAU7WSo7YDoSzolZIQKpYFHrPpjkB2nuyahcKfrmLXeQlh7gqJYdw==}
dev: true
@ -1810,14 +1822,14 @@ packages:
/@types/ws@7.4.7:
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
/@types/yauzl@2.10.0:
resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==}
requiresBuild: true
dependencies:
'@types/node': 20.4.10
'@types/node': 20.5.0
dev: true
optional: true
@ -2737,7 +2749,7 @@ packages:
dependencies:
'@types/cookie': 0.4.1
'@types/cors': 2.8.13
'@types/node': 20.4.10
'@types/node': 20.5.0
accepts: 1.3.8
base64id: 2.0.0
cookie: 0.4.2
@ -2757,7 +2769,7 @@ packages:
dependencies:
'@types/cookie': 0.4.1
'@types/cors': 2.8.13
'@types/node': 20.4.10
'@types/node': 20.5.0
accepts: 1.3.8
base64id: 2.0.0
cookie: 0.4.2
@ -4259,6 +4271,12 @@ packages:
hasBin: true
dev: true
/nanoid@4.0.2:
resolution: {integrity: sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==}
engines: {node: ^14 || ^16 || >=18}
hasBin: true
dev: false
/negotiator@0.6.3:
resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
engines: {node: '>= 0.6'}
@ -5306,7 +5324,7 @@ packages:
hasBin: true
dev: true
/ts-node@10.9.1(@types/node@20.4.10)(typescript@5.1.6):
/ts-node@10.9.1(@types/node@20.5.0)(typescript@5.1.6):
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true
peerDependencies:
@ -5325,7 +5343,7 @@ packages:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 20.4.10
'@types/node': 20.5.0
acorn: 8.10.0
acorn-walk: 8.2.0
arg: 4.1.3
@ -5505,6 +5523,11 @@ packages:
hasBin: true
dev: true
/uuid@9.0.0:
resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==}
hasBin: true
dev: false
/v8-compile-cache-lib@3.0.1:
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}
dev: true

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/taskbuffer',
version: '3.1.3',
version: '3.1.4',
description: 'flexible task management. TypeScript ready!'
}

View File

@ -6,6 +6,7 @@ import * as plugins from './taskbuffer.plugins.js';
*/
export interface IDistributedTaskRequest {
submitterId: string;
requestResponseId: string;
taskName: string;
taskVersion: string;
taskExecutionTime: number;

View File

@ -13,7 +13,7 @@ export interface ITaskManagerConstructorOptions {
}
export class TaskManager {
public randomId = plugins.isounique.uni();
public randomId = plugins.smartunique.shortId();
public taskMap = new plugins.lik.ObjectMap<Task>();
private cronJobManager = new plugins.smarttime.CronManager();
public options: ITaskManagerConstructorOptions = {
@ -90,8 +90,10 @@ export class TaskManager {
private async performDistributedConsultation(task: Task, triggerTime: number): Promise<IDistributedTaskRequestResult> {
console.log('Found a distributed coordinator, performing consultation.');
return this.options.distributedCoordinator.fireDistributedTaskRequest({
submitterId: this.randomId,
requestResponseId: plugins.smartunique.shortId(),
status: 'requesting',
taskExecutionParallel: 1,
taskExecutionTime: triggerTime,

View File

@ -1,9 +1,9 @@
import * as isounique from '@push.rocks/isounique';
import * as lik from '@push.rocks/lik';
import * as smartlog from '@push.rocks/smartlog';
import * as smartpromise from '@push.rocks/smartpromise';
import * as smartdelay from '@push.rocks/smartdelay';
import * as smartrx from '@push.rocks/smartrx';
import * as smarttime from '@push.rocks/smarttime';
import * as smartunique from '@push.rocks/smartunique';
export { isounique, lik, smartlog, smartpromise, smartdelay, smartrx, smarttime };
export { lik, smartlog, smartpromise, smartdelay, smartrx, smarttime, smartunique };