@hotmeshio/hotmesh 0.0.8 → 0.0.9
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/LICENSE +4 -7
- package/README.md +37 -46
- package/build/{esm/package.json → package.json} +4 -11
- package/build/{cjs/services → services}/durable/native.js +2 -2
- package/build/{esm/services → services}/durable/worker.d.ts +1 -3
- package/build/{cjs/services → services}/durable/worker.js +9 -32
- package/build/{cjs/services → services}/durable/workflow.js +6 -1
- package/build/{cjs/types → types}/durable.d.ts +4 -6
- package/package.json +4 -11
- package/services/durable/native.ts +2 -2
- package/services/durable/worker.ts +9 -9
- package/services/durable/workflow.ts +7 -1
- package/types/durable.ts +4 -4
- package/build/cjs/package.json +0 -82
- package/build/cjs/services/durable/worker.d.ts +0 -38
- package/build/esm/index.d.ts +0 -4
- package/build/esm/index.js +0 -3
- package/build/esm/modules/errors.d.ts +0 -28
- package/build/esm/modules/errors.js +0 -41
- package/build/esm/modules/key.d.ts +0 -75
- package/build/esm/modules/key.js +0 -111
- package/build/esm/modules/utils.d.ts +0 -34
- package/build/esm/modules/utils.js +0 -154
- package/build/esm/services/activities/activity.d.ts +0 -67
- package/build/esm/services/activities/activity.js +0 -486
- package/build/esm/services/activities/await.d.ts +0 -16
- package/build/esm/services/activities/await.js +0 -140
- package/build/esm/services/activities/cycle.d.ts +0 -19
- package/build/esm/services/activities/cycle.js +0 -74
- package/build/esm/services/activities/emit.d.ts +0 -9
- package/build/esm/services/activities/emit.js +0 -10
- package/build/esm/services/activities/index.d.ts +0 -17
- package/build/esm/services/activities/index.js +0 -16
- package/build/esm/services/activities/iterate.d.ts +0 -9
- package/build/esm/services/activities/iterate.js +0 -10
- package/build/esm/services/activities/trigger.d.ts +0 -22
- package/build/esm/services/activities/trigger.js +0 -158
- package/build/esm/services/activities/worker.d.ts +0 -11
- package/build/esm/services/activities/worker.js +0 -70
- package/build/esm/services/collator/index.d.ts +0 -73
- package/build/esm/services/collator/index.js +0 -221
- package/build/esm/services/compiler/deployer.d.ts +0 -36
- package/build/esm/services/compiler/deployer.js +0 -423
- package/build/esm/services/compiler/index.d.ts +0 -30
- package/build/esm/services/compiler/index.js +0 -82
- package/build/esm/services/compiler/validator.d.ts +0 -32
- package/build/esm/services/compiler/validator.js +0 -131
- package/build/esm/services/connector/clients/ioredis.d.ts +0 -13
- package/build/esm/services/connector/clients/ioredis.js +0 -47
- package/build/esm/services/connector/clients/redis.d.ts +0 -13
- package/build/esm/services/connector/clients/redis.js +0 -59
- package/build/esm/services/connector/index.d.ts +0 -5
- package/build/esm/services/connector/index.js +0 -27
- package/build/esm/services/dimension/index.d.ts +0 -29
- package/build/esm/services/dimension/index.js +0 -32
- package/build/esm/services/durable/asyncLocalStorage.d.ts +0 -3
- package/build/esm/services/durable/asyncLocalStorage.js +0 -2
- package/build/esm/services/durable/client.d.ts +0 -15
- package/build/esm/services/durable/client.js +0 -114
- package/build/esm/services/durable/connection.d.ts +0 -4
- package/build/esm/services/durable/connection.js +0 -47
- package/build/esm/services/durable/factory.d.ts +0 -3
- package/build/esm/services/durable/factory.js +0 -135
- package/build/esm/services/durable/handle.d.ts +0 -8
- package/build/esm/services/durable/handle.js +0 -34
- package/build/esm/services/durable/index.d.ts +0 -57
- package/build/esm/services/durable/index.js +0 -55
- package/build/esm/services/durable/native.d.ts +0 -4
- package/build/esm/services/durable/native.js +0 -43
- package/build/esm/services/durable/worker.js +0 -267
- package/build/esm/services/durable/workflow.d.ts +0 -6
- package/build/esm/services/durable/workflow.js +0 -132
- package/build/esm/services/engine/index.d.ts +0 -82
- package/build/esm/services/engine/index.js +0 -522
- package/build/esm/services/hotmesh/index.d.ts +0 -45
- package/build/esm/services/hotmesh/index.js +0 -131
- package/build/esm/services/logger/index.d.ts +0 -17
- package/build/esm/services/logger/index.js +0 -70
- package/build/esm/services/mapper/index.d.ts +0 -24
- package/build/esm/services/mapper/index.js +0 -72
- package/build/esm/services/pipe/functions/array.d.ts +0 -24
- package/build/esm/services/pipe/functions/array.js +0 -66
- package/build/esm/services/pipe/functions/bitwise.d.ts +0 -9
- package/build/esm/services/pipe/functions/bitwise.js +0 -21
- package/build/esm/services/pipe/functions/conditional.d.ts +0 -10
- package/build/esm/services/pipe/functions/conditional.js +0 -24
- package/build/esm/services/pipe/functions/date.d.ts +0 -57
- package/build/esm/services/pipe/functions/date.js +0 -164
- package/build/esm/services/pipe/functions/index.d.ts +0 -25
- package/build/esm/services/pipe/functions/index.js +0 -24
- package/build/esm/services/pipe/functions/json.d.ts +0 -5
- package/build/esm/services/pipe/functions/json.js +0 -9
- package/build/esm/services/pipe/functions/math.d.ts +0 -38
- package/build/esm/services/pipe/functions/math.js +0 -108
- package/build/esm/services/pipe/functions/number.d.ts +0 -25
- package/build/esm/services/pipe/functions/number.js +0 -130
- package/build/esm/services/pipe/functions/object.d.ts +0 -22
- package/build/esm/services/pipe/functions/object.js +0 -60
- package/build/esm/services/pipe/functions/string.d.ts +0 -23
- package/build/esm/services/pipe/functions/string.js +0 -66
- package/build/esm/services/pipe/functions/symbol.d.ts +0 -12
- package/build/esm/services/pipe/functions/symbol.js +0 -30
- package/build/esm/services/pipe/functions/unary.d.ts +0 -7
- package/build/esm/services/pipe/functions/unary.js +0 -15
- package/build/esm/services/pipe/index.d.ts +0 -30
- package/build/esm/services/pipe/index.js +0 -122
- package/build/esm/services/quorum/index.d.ts +0 -34
- package/build/esm/services/quorum/index.js +0 -144
- package/build/esm/services/reporter/index.d.ts +0 -47
- package/build/esm/services/reporter/index.js +0 -327
- package/build/esm/services/serializer/index.d.ts +0 -41
- package/build/esm/services/serializer/index.js +0 -251
- package/build/esm/services/signaler/store.d.ts +0 -15
- package/build/esm/services/signaler/store.js +0 -50
- package/build/esm/services/signaler/stream.d.ts +0 -43
- package/build/esm/services/signaler/stream.js +0 -314
- package/build/esm/services/store/cache.d.ts +0 -66
- package/build/esm/services/store/cache.js +0 -124
- package/build/esm/services/store/clients/ioredis.d.ts +0 -27
- package/build/esm/services/store/clients/ioredis.js +0 -93
- package/build/esm/services/store/clients/redis.d.ts +0 -29
- package/build/esm/services/store/clients/redis.js +0 -140
- package/build/esm/services/store/index.d.ts +0 -88
- package/build/esm/services/store/index.js +0 -623
- package/build/esm/services/stream/clients/ioredis.d.ts +0 -23
- package/build/esm/services/stream/clients/ioredis.js +0 -112
- package/build/esm/services/stream/clients/redis.d.ts +0 -23
- package/build/esm/services/stream/clients/redis.js +0 -116
- package/build/esm/services/stream/index.d.ts +0 -21
- package/build/esm/services/stream/index.js +0 -6
- package/build/esm/services/sub/clients/ioredis.d.ts +0 -20
- package/build/esm/services/sub/clients/ioredis.js +0 -69
- package/build/esm/services/sub/clients/redis.d.ts +0 -20
- package/build/esm/services/sub/clients/redis.js +0 -60
- package/build/esm/services/sub/index.d.ts +0 -18
- package/build/esm/services/sub/index.js +0 -6
- package/build/esm/services/task/index.d.ts +0 -18
- package/build/esm/services/task/index.js +0 -70
- package/build/esm/services/telemetry/index.d.ts +0 -49
- package/build/esm/services/telemetry/index.js +0 -217
- package/build/esm/services/worker/index.d.ts +0 -30
- package/build/esm/services/worker/index.js +0 -102
- package/build/esm/types/activity.d.ts +0 -92
- package/build/esm/types/activity.js +0 -1
- package/build/esm/types/app.d.ts +0 -16
- package/build/esm/types/app.js +0 -1
- package/build/esm/types/async.d.ts +0 -5
- package/build/esm/types/async.js +0 -1
- package/build/esm/types/cache.d.ts +0 -1
- package/build/esm/types/cache.js +0 -1
- package/build/esm/types/collator.d.ts +0 -8
- package/build/esm/types/collator.js +0 -8
- package/build/esm/types/durable.d.ts +0 -59
- package/build/esm/types/durable.js +0 -1
- package/build/esm/types/hook.d.ts +0 -31
- package/build/esm/types/hook.js +0 -6
- package/build/esm/types/hotmesh.d.ts +0 -82
- package/build/esm/types/hotmesh.js +0 -1
- package/build/esm/types/index.d.ts +0 -20
- package/build/esm/types/index.js +0 -5
- package/build/esm/types/ioredisclient.d.ts +0 -5
- package/build/esm/types/ioredisclient.js +0 -2
- package/build/esm/types/job.d.ts +0 -50
- package/build/esm/types/job.js +0 -1
- package/build/esm/types/logger.d.ts +0 -6
- package/build/esm/types/logger.js +0 -1
- package/build/esm/types/map.d.ts +0 -4
- package/build/esm/types/map.js +0 -1
- package/build/esm/types/pipe.d.ts +0 -4
- package/build/esm/types/pipe.js +0 -1
- package/build/esm/types/quorum.d.ts +0 -46
- package/build/esm/types/quorum.js +0 -1
- package/build/esm/types/redis.d.ts +0 -8
- package/build/esm/types/redis.js +0 -1
- package/build/esm/types/redisclient.d.ts +0 -25
- package/build/esm/types/redisclient.js +0 -1
- package/build/esm/types/serializer.d.ts +0 -33
- package/build/esm/types/serializer.js +0 -1
- package/build/esm/types/stats.d.ts +0 -83
- package/build/esm/types/stats.js +0 -1
- package/build/esm/types/stream.d.ts +0 -67
- package/build/esm/types/stream.js +0 -22
- package/build/esm/types/telemetry.d.ts +0 -1
- package/build/esm/types/telemetry.js +0 -1
- package/build/esm/types/transition.d.ts +0 -17
- package/build/esm/types/transition.js +0 -1
- package/tsconfig.cjs.json +0 -8
- package/tsconfig.esm.json +0 -9
- /package/build/{cjs/index.d.ts → index.d.ts} +0 -0
- /package/build/{cjs/index.js → index.js} +0 -0
- /package/build/{cjs/modules → modules}/errors.d.ts +0 -0
- /package/build/{cjs/modules → modules}/errors.js +0 -0
- /package/build/{cjs/modules → modules}/key.d.ts +0 -0
- /package/build/{cjs/modules → modules}/key.js +0 -0
- /package/build/{cjs/modules → modules}/utils.d.ts +0 -0
- /package/build/{cjs/modules → modules}/utils.js +0 -0
- /package/build/{cjs/services → services}/activities/activity.d.ts +0 -0
- /package/build/{cjs/services → services}/activities/activity.js +0 -0
- /package/build/{cjs/services → services}/activities/await.d.ts +0 -0
- /package/build/{cjs/services → services}/activities/await.js +0 -0
- /package/build/{cjs/services → services}/activities/cycle.d.ts +0 -0
- /package/build/{cjs/services → services}/activities/cycle.js +0 -0
- /package/build/{cjs/services → services}/activities/emit.d.ts +0 -0
- /package/build/{cjs/services → services}/activities/emit.js +0 -0
- /package/build/{cjs/services → services}/activities/index.d.ts +0 -0
- /package/build/{cjs/services → services}/activities/index.js +0 -0
- /package/build/{cjs/services → services}/activities/iterate.d.ts +0 -0
- /package/build/{cjs/services → services}/activities/iterate.js +0 -0
- /package/build/{cjs/services → services}/activities/trigger.d.ts +0 -0
- /package/build/{cjs/services → services}/activities/trigger.js +0 -0
- /package/build/{cjs/services → services}/activities/worker.d.ts +0 -0
- /package/build/{cjs/services → services}/activities/worker.js +0 -0
- /package/build/{cjs/services → services}/collator/index.d.ts +0 -0
- /package/build/{cjs/services → services}/collator/index.js +0 -0
- /package/build/{cjs/services → services}/compiler/deployer.d.ts +0 -0
- /package/build/{cjs/services → services}/compiler/deployer.js +0 -0
- /package/build/{cjs/services → services}/compiler/index.d.ts +0 -0
- /package/build/{cjs/services → services}/compiler/index.js +0 -0
- /package/build/{cjs/services → services}/compiler/validator.d.ts +0 -0
- /package/build/{cjs/services → services}/compiler/validator.js +0 -0
- /package/build/{cjs/services → services}/connector/clients/ioredis.d.ts +0 -0
- /package/build/{cjs/services → services}/connector/clients/ioredis.js +0 -0
- /package/build/{cjs/services → services}/connector/clients/redis.d.ts +0 -0
- /package/build/{cjs/services → services}/connector/clients/redis.js +0 -0
- /package/build/{cjs/services → services}/connector/index.d.ts +0 -0
- /package/build/{cjs/services → services}/connector/index.js +0 -0
- /package/build/{cjs/services → services}/dimension/index.d.ts +0 -0
- /package/build/{cjs/services → services}/dimension/index.js +0 -0
- /package/build/{cjs/services → services}/durable/asyncLocalStorage.d.ts +0 -0
- /package/build/{cjs/services → services}/durable/asyncLocalStorage.js +0 -0
- /package/build/{cjs/services → services}/durable/client.d.ts +0 -0
- /package/build/{cjs/services → services}/durable/client.js +0 -0
- /package/build/{cjs/services → services}/durable/connection.d.ts +0 -0
- /package/build/{cjs/services → services}/durable/connection.js +0 -0
- /package/build/{cjs/services → services}/durable/factory.d.ts +0 -0
- /package/build/{cjs/services → services}/durable/factory.js +0 -0
- /package/build/{cjs/services → services}/durable/handle.d.ts +0 -0
- /package/build/{cjs/services → services}/durable/handle.js +0 -0
- /package/build/{cjs/services → services}/durable/index.d.ts +0 -0
- /package/build/{cjs/services → services}/durable/index.js +0 -0
- /package/build/{cjs/services → services}/durable/native.d.ts +0 -0
- /package/build/{cjs/services → services}/durable/workflow.d.ts +0 -0
- /package/build/{cjs/services → services}/engine/index.d.ts +0 -0
- /package/build/{cjs/services → services}/engine/index.js +0 -0
- /package/build/{cjs/services → services}/hotmesh/index.d.ts +0 -0
- /package/build/{cjs/services → services}/hotmesh/index.js +0 -0
- /package/build/{cjs/services → services}/logger/index.d.ts +0 -0
- /package/build/{cjs/services → services}/logger/index.js +0 -0
- /package/build/{cjs/services → services}/mapper/index.d.ts +0 -0
- /package/build/{cjs/services → services}/mapper/index.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/array.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/array.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/bitwise.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/bitwise.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/conditional.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/conditional.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/date.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/date.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/index.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/index.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/json.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/json.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/math.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/math.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/number.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/number.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/object.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/object.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/string.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/string.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/symbol.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/symbol.js +0 -0
- /package/build/{cjs/services → services}/pipe/functions/unary.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/functions/unary.js +0 -0
- /package/build/{cjs/services → services}/pipe/index.d.ts +0 -0
- /package/build/{cjs/services → services}/pipe/index.js +0 -0
- /package/build/{cjs/services → services}/quorum/index.d.ts +0 -0
- /package/build/{cjs/services → services}/quorum/index.js +0 -0
- /package/build/{cjs/services → services}/reporter/index.d.ts +0 -0
- /package/build/{cjs/services → services}/reporter/index.js +0 -0
- /package/build/{cjs/services → services}/serializer/index.d.ts +0 -0
- /package/build/{cjs/services → services}/serializer/index.js +0 -0
- /package/build/{cjs/services → services}/signaler/store.d.ts +0 -0
- /package/build/{cjs/services → services}/signaler/store.js +0 -0
- /package/build/{cjs/services → services}/signaler/stream.d.ts +0 -0
- /package/build/{cjs/services → services}/signaler/stream.js +0 -0
- /package/build/{cjs/services → services}/store/cache.d.ts +0 -0
- /package/build/{cjs/services → services}/store/cache.js +0 -0
- /package/build/{cjs/services → services}/store/clients/ioredis.d.ts +0 -0
- /package/build/{cjs/services → services}/store/clients/ioredis.js +0 -0
- /package/build/{cjs/services → services}/store/clients/redis.d.ts +0 -0
- /package/build/{cjs/services → services}/store/clients/redis.js +0 -0
- /package/build/{cjs/services → services}/store/index.d.ts +0 -0
- /package/build/{cjs/services → services}/store/index.js +0 -0
- /package/build/{cjs/services → services}/stream/clients/ioredis.d.ts +0 -0
- /package/build/{cjs/services → services}/stream/clients/ioredis.js +0 -0
- /package/build/{cjs/services → services}/stream/clients/redis.d.ts +0 -0
- /package/build/{cjs/services → services}/stream/clients/redis.js +0 -0
- /package/build/{cjs/services → services}/stream/index.d.ts +0 -0
- /package/build/{cjs/services → services}/stream/index.js +0 -0
- /package/build/{cjs/services → services}/sub/clients/ioredis.d.ts +0 -0
- /package/build/{cjs/services → services}/sub/clients/ioredis.js +0 -0
- /package/build/{cjs/services → services}/sub/clients/redis.d.ts +0 -0
- /package/build/{cjs/services → services}/sub/clients/redis.js +0 -0
- /package/build/{cjs/services → services}/sub/index.d.ts +0 -0
- /package/build/{cjs/services → services}/sub/index.js +0 -0
- /package/build/{cjs/services → services}/task/index.d.ts +0 -0
- /package/build/{cjs/services → services}/task/index.js +0 -0
- /package/build/{cjs/services → services}/telemetry/index.d.ts +0 -0
- /package/build/{cjs/services → services}/telemetry/index.js +0 -0
- /package/build/{cjs/services → services}/worker/index.d.ts +0 -0
- /package/build/{cjs/services → services}/worker/index.js +0 -0
- /package/build/{cjs/types → types}/activity.d.ts +0 -0
- /package/build/{cjs/types → types}/activity.js +0 -0
- /package/build/{cjs/types → types}/app.d.ts +0 -0
- /package/build/{cjs/types → types}/app.js +0 -0
- /package/build/{cjs/types → types}/async.d.ts +0 -0
- /package/build/{cjs/types → types}/async.js +0 -0
- /package/build/{cjs/types → types}/cache.d.ts +0 -0
- /package/build/{cjs/types → types}/cache.js +0 -0
- /package/build/{cjs/types → types}/collator.d.ts +0 -0
- /package/build/{cjs/types → types}/collator.js +0 -0
- /package/build/{cjs/types → types}/durable.js +0 -0
- /package/build/{cjs/types → types}/hook.d.ts +0 -0
- /package/build/{cjs/types → types}/hook.js +0 -0
- /package/build/{cjs/types → types}/hotmesh.d.ts +0 -0
- /package/build/{cjs/types → types}/hotmesh.js +0 -0
- /package/build/{cjs/types → types}/index.d.ts +0 -0
- /package/build/{cjs/types → types}/index.js +0 -0
- /package/build/{cjs/types → types}/ioredisclient.d.ts +0 -0
- /package/build/{cjs/types → types}/ioredisclient.js +0 -0
- /package/build/{cjs/types → types}/job.d.ts +0 -0
- /package/build/{cjs/types → types}/job.js +0 -0
- /package/build/{cjs/types → types}/logger.d.ts +0 -0
- /package/build/{cjs/types → types}/logger.js +0 -0
- /package/build/{cjs/types → types}/map.d.ts +0 -0
- /package/build/{cjs/types → types}/map.js +0 -0
- /package/build/{cjs/types → types}/pipe.d.ts +0 -0
- /package/build/{cjs/types → types}/pipe.js +0 -0
- /package/build/{cjs/types → types}/quorum.d.ts +0 -0
- /package/build/{cjs/types → types}/quorum.js +0 -0
- /package/build/{cjs/types → types}/redis.d.ts +0 -0
- /package/build/{cjs/types → types}/redis.js +0 -0
- /package/build/{cjs/types → types}/redisclient.d.ts +0 -0
- /package/build/{cjs/types → types}/redisclient.js +0 -0
- /package/build/{cjs/types → types}/serializer.d.ts +0 -0
- /package/build/{cjs/types → types}/serializer.js +0 -0
- /package/build/{cjs/types → types}/stats.d.ts +0 -0
- /package/build/{cjs/types → types}/stats.js +0 -0
- /package/build/{cjs/types → types}/stream.d.ts +0 -0
- /package/build/{cjs/types → types}/stream.js +0 -0
- /package/build/{cjs/types → types}/telemetry.d.ts +0 -0
- /package/build/{cjs/types → types}/telemetry.js +0 -0
- /package/build/{cjs/types → types}/transition.d.ts +0 -0
- /package/build/{cjs/types → types}/transition.js +0 -0
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { GetStateError } from '../../modules/errors';
|
|
2
|
-
import { CollatorService } from '../collator';
|
|
3
|
-
import { Activity } from './activity';
|
|
4
|
-
import { TelemetryService } from '../telemetry';
|
|
5
|
-
class Cycle extends Activity {
|
|
6
|
-
constructor(config, data, metadata, hook, engine, context) {
|
|
7
|
-
super(config, data, metadata, hook, engine, context);
|
|
8
|
-
}
|
|
9
|
-
//******** LEG 1 ENTRY ********//
|
|
10
|
-
async process() {
|
|
11
|
-
this.logger.debug('cycle-process', { jid: this.context.metadata.jid, aid: this.metadata.aid });
|
|
12
|
-
let telemetry;
|
|
13
|
-
try {
|
|
14
|
-
//verify entry is allowed
|
|
15
|
-
this.setLeg(1);
|
|
16
|
-
await CollatorService.notarizeEntry(this);
|
|
17
|
-
await this.getState();
|
|
18
|
-
telemetry = new TelemetryService(this.engine.appId, this.config, this.metadata, this.context);
|
|
19
|
-
telemetry.startActivitySpan(this.leg);
|
|
20
|
-
this.mapInputData();
|
|
21
|
-
//set state/status
|
|
22
|
-
let multi = this.store.getMulti();
|
|
23
|
-
await this.setState(multi);
|
|
24
|
-
await this.setStatus(0, multi); //leg 1 never changes job status
|
|
25
|
-
const multiResponse = await multi.exec();
|
|
26
|
-
telemetry.mapActivityAttributes();
|
|
27
|
-
const jobStatus = this.resolveStatus(multiResponse);
|
|
28
|
-
//cycle the target ancestor
|
|
29
|
-
multi = this.store.getMulti();
|
|
30
|
-
const messageId = await this.cycleAncestorActivity(multi);
|
|
31
|
-
telemetry.setActivityAttributes({
|
|
32
|
-
'app.activity.mid': messageId,
|
|
33
|
-
'app.job.jss': jobStatus
|
|
34
|
-
});
|
|
35
|
-
//exit early (`Cycle` activities only execute Leg 1)
|
|
36
|
-
await CollatorService.notarizeEarlyExit(this, multi);
|
|
37
|
-
await multi.exec();
|
|
38
|
-
return this.context.metadata.aid;
|
|
39
|
-
}
|
|
40
|
-
catch (error) {
|
|
41
|
-
if (error instanceof GetStateError) {
|
|
42
|
-
this.logger.error('cycle-get-state-error', error);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
this.logger.error('cycle-process-error', error);
|
|
46
|
-
}
|
|
47
|
-
telemetry.setActivityError(error.message);
|
|
48
|
-
throw error;
|
|
49
|
-
}
|
|
50
|
-
finally {
|
|
51
|
-
telemetry.endActivitySpan();
|
|
52
|
-
this.logger.debug('cycle-process-end', { jid: this.context.metadata.jid, aid: this.metadata.aid });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Trigger the target ancestor to execute in a cycle,
|
|
57
|
-
* without violating the constraints of the DAG. Immutable
|
|
58
|
-
* `individual activity state` will execute in a new dimensional
|
|
59
|
-
* thread while `shared job state` can change. This
|
|
60
|
-
* pattern allows for retries without violating the DAG.
|
|
61
|
-
*/
|
|
62
|
-
async cycleAncestorActivity(multi) {
|
|
63
|
-
const streamData = {
|
|
64
|
-
metadata: {
|
|
65
|
-
dad: CollatorService.resolveReentryDimension(this),
|
|
66
|
-
jid: this.context.metadata.jid,
|
|
67
|
-
aid: this.config.ancestor,
|
|
68
|
-
},
|
|
69
|
-
data: {} //todo: verify immutability, before enabling: `this.context.data`
|
|
70
|
-
};
|
|
71
|
-
return (await this.engine.streamSignaler?.publishMessage(null, streamData, multi));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
export { Cycle };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EngineService } from '../engine';
|
|
2
|
-
import { Activity, ActivityType } from './activity';
|
|
3
|
-
import { ActivityData, ActivityMetadata, EmitActivity } from '../../types/activity';
|
|
4
|
-
declare class Emit extends Activity {
|
|
5
|
-
config: EmitActivity;
|
|
6
|
-
constructor(config: ActivityType, data: ActivityData, metadata: ActivityMetadata, hook: ActivityData | null, engine: EngineService);
|
|
7
|
-
mapInputData(): Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
export { Emit };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Activity } from './activity';
|
|
2
|
-
class Emit extends Activity {
|
|
3
|
-
constructor(config, data, metadata, hook, engine) {
|
|
4
|
-
super(config, data, metadata, hook, engine);
|
|
5
|
-
}
|
|
6
|
-
async mapInputData() {
|
|
7
|
-
this.logger.info('emit-map-input-data');
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export { Emit };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Activity } from './activity';
|
|
2
|
-
import { Await } from './await';
|
|
3
|
-
import { Cycle } from './cycle';
|
|
4
|
-
import { Emit } from './emit';
|
|
5
|
-
import { Iterate } from './iterate';
|
|
6
|
-
import { Trigger } from './trigger';
|
|
7
|
-
import { Worker } from './worker';
|
|
8
|
-
declare const _default: {
|
|
9
|
-
activity: typeof Activity;
|
|
10
|
-
await: typeof Await;
|
|
11
|
-
cycle: typeof Cycle;
|
|
12
|
-
iterate: typeof Iterate;
|
|
13
|
-
emit: typeof Emit;
|
|
14
|
-
trigger: typeof Trigger;
|
|
15
|
-
worker: typeof Worker;
|
|
16
|
-
};
|
|
17
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Activity } from './activity';
|
|
2
|
-
import { Await } from './await';
|
|
3
|
-
import { Cycle } from './cycle';
|
|
4
|
-
import { Emit } from './emit';
|
|
5
|
-
import { Iterate } from './iterate';
|
|
6
|
-
import { Trigger } from './trigger';
|
|
7
|
-
import { Worker } from './worker';
|
|
8
|
-
export default {
|
|
9
|
-
activity: Activity,
|
|
10
|
-
await: Await,
|
|
11
|
-
cycle: Cycle,
|
|
12
|
-
iterate: Iterate,
|
|
13
|
-
emit: Emit,
|
|
14
|
-
trigger: Trigger,
|
|
15
|
-
worker: Worker,
|
|
16
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { EngineService } from '../engine';
|
|
2
|
-
import { Activity, ActivityType } from './activity';
|
|
3
|
-
import { ActivityData, ActivityMetadata, IterateActivity } from '../../types/activity';
|
|
4
|
-
declare class Iterate extends Activity {
|
|
5
|
-
config: IterateActivity;
|
|
6
|
-
constructor(config: ActivityType, data: ActivityData, metadata: ActivityMetadata, hook: ActivityData | null, engine: EngineService);
|
|
7
|
-
mapInputData(): Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
export { Iterate };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Activity } from './activity';
|
|
2
|
-
class Iterate extends Activity {
|
|
3
|
-
constructor(config, data, metadata, hook, engine) {
|
|
4
|
-
super(config, data, metadata, hook, engine);
|
|
5
|
-
}
|
|
6
|
-
async mapInputData() {
|
|
7
|
-
this.logger.info('iterate-map-input-data');
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export { Iterate };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Activity } from './activity';
|
|
2
|
-
import { EngineService } from '../engine';
|
|
3
|
-
import { ActivityData, ActivityMetadata, ActivityType, TriggerActivity } from '../../types/activity';
|
|
4
|
-
import { JobState } from '../../types/job';
|
|
5
|
-
import { RedisMulti } from '../../types/redis';
|
|
6
|
-
declare class Trigger extends Activity {
|
|
7
|
-
config: TriggerActivity;
|
|
8
|
-
constructor(config: ActivityType, data: ActivityData, metadata: ActivityMetadata, hook: ActivityData | null, engine: EngineService, context?: JobState);
|
|
9
|
-
process(): Promise<string>;
|
|
10
|
-
setStatus(amount: number): Promise<void>;
|
|
11
|
-
createInputContext(): Partial<JobState>;
|
|
12
|
-
getState(): Promise<void>;
|
|
13
|
-
bindJobMetadataPaths(): string[];
|
|
14
|
-
bindActivityMetadataPaths(): string[];
|
|
15
|
-
resolveGranularity(): string;
|
|
16
|
-
getJobStatus(): number;
|
|
17
|
-
resolveJobId(context: Partial<JobState>): string;
|
|
18
|
-
resolveJobKey(context: Partial<JobState>): string;
|
|
19
|
-
setStateNX(): Promise<void>;
|
|
20
|
-
setStats(multi?: RedisMulti): Promise<void>;
|
|
21
|
-
}
|
|
22
|
-
export { Trigger };
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
-
import { DuplicateJobError } from '../../modules/errors';
|
|
3
|
-
import { formatISODate, getTimeSeries } from '../../modules/utils';
|
|
4
|
-
import { Activity } from './activity';
|
|
5
|
-
import { CollatorService } from '../collator';
|
|
6
|
-
import { DimensionService } from '../dimension';
|
|
7
|
-
import { Pipe } from '../pipe';
|
|
8
|
-
import { ReporterService } from '../reporter';
|
|
9
|
-
import { MDATA_SYMBOLS } from '../serializer';
|
|
10
|
-
import { TelemetryService } from '../telemetry';
|
|
11
|
-
class Trigger extends Activity {
|
|
12
|
-
constructor(config, data, metadata, hook, engine, context) {
|
|
13
|
-
super(config, data, metadata, hook, engine, context);
|
|
14
|
-
}
|
|
15
|
-
async process() {
|
|
16
|
-
this.logger.debug('trigger-process', { subscribes: this.config.subscribes });
|
|
17
|
-
let telemetry;
|
|
18
|
-
try {
|
|
19
|
-
this.setLeg(2);
|
|
20
|
-
await this.getState();
|
|
21
|
-
telemetry = new TelemetryService(this.engine.appId, this.config, this.metadata, this.context);
|
|
22
|
-
telemetry.startJobSpan();
|
|
23
|
-
telemetry.startActivitySpan(this.leg);
|
|
24
|
-
this.mapJobData();
|
|
25
|
-
await this.setStateNX();
|
|
26
|
-
this.adjacencyList = await this.filterAdjacent();
|
|
27
|
-
await this.setStatus(this.adjacencyList.length);
|
|
28
|
-
const multi = this.store.getMulti();
|
|
29
|
-
await this.setState(multi);
|
|
30
|
-
await this.setStats(multi);
|
|
31
|
-
await multi.exec();
|
|
32
|
-
telemetry.mapActivityAttributes();
|
|
33
|
-
const jobStatus = Number(this.context.metadata.js);
|
|
34
|
-
telemetry.setJobAttributes({ 'app.job.jss': jobStatus });
|
|
35
|
-
const attrs = { 'app.job.jss': jobStatus };
|
|
36
|
-
const messageIds = await this.transition(this.adjacencyList, jobStatus);
|
|
37
|
-
if (messageIds.length) {
|
|
38
|
-
attrs['app.activity.mids'] = messageIds.join(',');
|
|
39
|
-
}
|
|
40
|
-
telemetry.setActivityAttributes(attrs);
|
|
41
|
-
return this.context.metadata.jid;
|
|
42
|
-
}
|
|
43
|
-
catch (error) {
|
|
44
|
-
if (error instanceof DuplicateJobError) {
|
|
45
|
-
this.logger.error('duplicate-job-error', error);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
this.logger.error('trigger-process-error', error);
|
|
49
|
-
}
|
|
50
|
-
telemetry.setActivityError(error.message);
|
|
51
|
-
throw error;
|
|
52
|
-
}
|
|
53
|
-
finally {
|
|
54
|
-
telemetry.endJobSpan();
|
|
55
|
-
telemetry.endActivitySpan();
|
|
56
|
-
this.logger.debug('trigger-process-end', { subscribes: this.config.subscribes, jid: this.context.metadata.jid });
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
async setStatus(amount) {
|
|
60
|
-
this.context.metadata.js = amount;
|
|
61
|
-
}
|
|
62
|
-
createInputContext() {
|
|
63
|
-
const input = {
|
|
64
|
-
[this.metadata.aid]: {
|
|
65
|
-
input: { data: this.data }
|
|
66
|
-
},
|
|
67
|
-
'$self': {
|
|
68
|
-
input: { data: this.data },
|
|
69
|
-
output: { data: this.data }
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
return input;
|
|
73
|
-
}
|
|
74
|
-
async getState() {
|
|
75
|
-
const inputContext = this.createInputContext();
|
|
76
|
-
const jobId = this.resolveJobId(inputContext);
|
|
77
|
-
const jobKey = this.resolveJobKey(inputContext);
|
|
78
|
-
const utc = formatISODate(new Date());
|
|
79
|
-
const { id, version } = await this.engine.getVID();
|
|
80
|
-
this.initDimensionalAddress(DimensionService.getSeed());
|
|
81
|
-
const activityMetadata = {
|
|
82
|
-
...this.metadata,
|
|
83
|
-
jid: jobId,
|
|
84
|
-
key: jobKey,
|
|
85
|
-
as: CollatorService.getTriggerSeed(),
|
|
86
|
-
};
|
|
87
|
-
this.context = {
|
|
88
|
-
metadata: {
|
|
89
|
-
...this.metadata,
|
|
90
|
-
ngn: this.context.metadata.ngn,
|
|
91
|
-
pj: this.context.metadata.pj,
|
|
92
|
-
pd: this.context.metadata.pd,
|
|
93
|
-
pa: this.context.metadata.pa,
|
|
94
|
-
app: id,
|
|
95
|
-
vrs: version,
|
|
96
|
-
tpc: this.config.subscribes,
|
|
97
|
-
trc: this.context.metadata.trc,
|
|
98
|
-
spn: this.context.metadata.spn,
|
|
99
|
-
jid: jobId,
|
|
100
|
-
dad: DimensionService.getSeed(),
|
|
101
|
-
key: jobKey,
|
|
102
|
-
jc: utc,
|
|
103
|
-
ju: utc,
|
|
104
|
-
ts: getTimeSeries(this.resolveGranularity()),
|
|
105
|
-
js: 0,
|
|
106
|
-
},
|
|
107
|
-
data: {},
|
|
108
|
-
[this.metadata.aid]: {
|
|
109
|
-
input: {
|
|
110
|
-
data: this.data,
|
|
111
|
-
metadata: activityMetadata
|
|
112
|
-
},
|
|
113
|
-
output: {
|
|
114
|
-
data: this.data,
|
|
115
|
-
metadata: activityMetadata
|
|
116
|
-
},
|
|
117
|
-
settings: { data: {} },
|
|
118
|
-
errors: { data: {} },
|
|
119
|
-
},
|
|
120
|
-
};
|
|
121
|
-
this.context['$self'] = this.context[this.metadata.aid];
|
|
122
|
-
}
|
|
123
|
-
bindJobMetadataPaths() {
|
|
124
|
-
return MDATA_SYMBOLS.JOB.KEYS.map((key) => `metadata/${key}`);
|
|
125
|
-
}
|
|
126
|
-
bindActivityMetadataPaths() {
|
|
127
|
-
return MDATA_SYMBOLS.ACTIVITY.KEYS.map((key) => `output/metadata/${key}`);
|
|
128
|
-
}
|
|
129
|
-
resolveGranularity() {
|
|
130
|
-
return ReporterService.DEFAULT_GRANULARITY;
|
|
131
|
-
}
|
|
132
|
-
getJobStatus() {
|
|
133
|
-
return this.context.metadata.js;
|
|
134
|
-
}
|
|
135
|
-
resolveJobId(context) {
|
|
136
|
-
const jobId = this.config.stats?.id;
|
|
137
|
-
return jobId ? Pipe.resolve(jobId, context) : uuidv4();
|
|
138
|
-
}
|
|
139
|
-
resolveJobKey(context) {
|
|
140
|
-
const jobKey = this.config.stats?.key;
|
|
141
|
-
return jobKey ? Pipe.resolve(jobKey, context) : '';
|
|
142
|
-
}
|
|
143
|
-
async setStateNX() {
|
|
144
|
-
const jobId = this.context.metadata.jid;
|
|
145
|
-
if (!await this.store.setStateNX(jobId, this.engine.appId)) {
|
|
146
|
-
throw new DuplicateJobError(jobId);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
async setStats(multi) {
|
|
150
|
-
const md = this.context.metadata;
|
|
151
|
-
if (this.config.stats?.measures) {
|
|
152
|
-
const config = await this.engine.getVID();
|
|
153
|
-
const reporter = new ReporterService(config, this.store, this.logger);
|
|
154
|
-
await this.store.setStats(md.key, md.jid, md.ts, reporter.resolveTriggerStatistics(this.config, this.context), config, multi);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
export { Trigger };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Activity } from './activity';
|
|
2
|
-
import { EngineService } from '../engine';
|
|
3
|
-
import { ActivityData, ActivityMetadata, ActivityType, WorkerActivity } from '../../types/activity';
|
|
4
|
-
import { JobState } from '../../types/job';
|
|
5
|
-
declare class Worker extends Activity {
|
|
6
|
-
config: WorkerActivity;
|
|
7
|
-
constructor(config: ActivityType, data: ActivityData, metadata: ActivityMetadata, hook: ActivityData | null, engine: EngineService, context?: JobState);
|
|
8
|
-
process(): Promise<string>;
|
|
9
|
-
execActivity(): Promise<string>;
|
|
10
|
-
}
|
|
11
|
-
export { Worker };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { GetStateError } from '../../modules/errors';
|
|
2
|
-
import { Activity } from './activity';
|
|
3
|
-
import { CollatorService } from '../collator';
|
|
4
|
-
import { TelemetryService } from '../telemetry';
|
|
5
|
-
class Worker extends Activity {
|
|
6
|
-
constructor(config, data, metadata, hook, engine, context) {
|
|
7
|
-
super(config, data, metadata, hook, engine, context);
|
|
8
|
-
}
|
|
9
|
-
//******** INITIAL ENTRY POINT (A) ********//
|
|
10
|
-
async process() {
|
|
11
|
-
this.logger.debug('worker-process', { jid: this.context.metadata.jid, aid: this.metadata.aid });
|
|
12
|
-
let telemetry;
|
|
13
|
-
try {
|
|
14
|
-
this.setLeg(1);
|
|
15
|
-
await CollatorService.notarizeEntry(this);
|
|
16
|
-
await this.getState();
|
|
17
|
-
telemetry = new TelemetryService(this.engine.appId, this.config, this.metadata, this.context);
|
|
18
|
-
telemetry.startActivitySpan(this.leg);
|
|
19
|
-
this.mapInputData();
|
|
20
|
-
const multi = this.store.getMulti();
|
|
21
|
-
//todo: await this.registerTimeout();
|
|
22
|
-
await CollatorService.authorizeReentry(this, multi);
|
|
23
|
-
await this.setState(multi);
|
|
24
|
-
await this.setStatus(0, multi);
|
|
25
|
-
const multiResponse = await multi.exec();
|
|
26
|
-
telemetry.mapActivityAttributes();
|
|
27
|
-
const jobStatus = this.resolveStatus(multiResponse);
|
|
28
|
-
const messageId = await this.execActivity();
|
|
29
|
-
telemetry.setActivityAttributes({
|
|
30
|
-
'app.activity.mid': messageId,
|
|
31
|
-
'app.job.jss': jobStatus
|
|
32
|
-
});
|
|
33
|
-
return this.context.metadata.aid;
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
if (error instanceof GetStateError) {
|
|
37
|
-
this.logger.error('worker-get-state-error', error);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
this.logger.error('worker-process-error', error);
|
|
41
|
-
}
|
|
42
|
-
telemetry.setActivityError(error.message);
|
|
43
|
-
throw error;
|
|
44
|
-
}
|
|
45
|
-
finally {
|
|
46
|
-
telemetry.endActivitySpan();
|
|
47
|
-
this.logger.debug('worker-process-end', { jid: this.context.metadata.jid, aid: this.metadata.aid });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
async execActivity() {
|
|
51
|
-
const streamData = {
|
|
52
|
-
metadata: {
|
|
53
|
-
jid: this.context.metadata.jid,
|
|
54
|
-
dad: this.metadata.dad,
|
|
55
|
-
aid: this.metadata.aid,
|
|
56
|
-
topic: this.config.subtype,
|
|
57
|
-
spn: this.context['$self'].output.metadata.l1s,
|
|
58
|
-
trc: this.context.metadata.trc,
|
|
59
|
-
},
|
|
60
|
-
data: this.context.data
|
|
61
|
-
};
|
|
62
|
-
if (this.config.retry) {
|
|
63
|
-
streamData.policies = {
|
|
64
|
-
retry: this.config.retry
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
return (await this.engine.streamSignaler?.publishMessage(this.config.subtype, streamData));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
export { Worker };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { RedisMulti } from '../../types/redis';
|
|
2
|
-
import { CollationStage } from '../../types/collator';
|
|
3
|
-
import { ActivityDuplex } from '../../types/activity';
|
|
4
|
-
import { HotMeshGraph } from '../../types/hotmesh';
|
|
5
|
-
import { Activity } from '../activities/activity';
|
|
6
|
-
import { Cycle } from '../activities/cycle';
|
|
7
|
-
declare class CollatorService {
|
|
8
|
-
static targetLength: number;
|
|
9
|
-
/**
|
|
10
|
-
* returns the dimensional address (dad) for the target; due
|
|
11
|
-
* to the nature of the notary system, the dad for leg 2 entry
|
|
12
|
-
* must target the `0` index while leg 2 exit must target the
|
|
13
|
-
* current index (0)
|
|
14
|
-
*/
|
|
15
|
-
static getDimensionalAddress(activity: Activity, isEntry?: boolean): Record<string, string>;
|
|
16
|
-
/**
|
|
17
|
-
* resolves the dimensional address for the
|
|
18
|
-
* ancestor in the graph to go back to. this address
|
|
19
|
-
* is determined by trimming the last digits from
|
|
20
|
-
* the `dad` (including the target).
|
|
21
|
-
* the target activity index is then set to `0`, so that
|
|
22
|
-
* the origin node can be queried for approval/entry.
|
|
23
|
-
*/
|
|
24
|
-
static resolveReentryDimension(activity: Cycle): string;
|
|
25
|
-
static notarizeEntry(activity: Activity, multi?: RedisMulti): Promise<number>;
|
|
26
|
-
static authorizeReentry(activity: Activity, multi?: RedisMulti): Promise<number>;
|
|
27
|
-
static notarizeEarlyExit(activity: Activity, multi?: RedisMulti): Promise<number>;
|
|
28
|
-
static notarizeEarlyCompletion(activity: Activity, multi?: RedisMulti): Promise<number>;
|
|
29
|
-
static notarizeReentry(activity: Activity, multi?: RedisMulti): Promise<number>;
|
|
30
|
-
static notarizeContinuation(activity: Activity, multi?: RedisMulti): Promise<number>;
|
|
31
|
-
static notarizeCompletion(activity: Activity, multi?: RedisMulti): Promise<number>;
|
|
32
|
-
static getDigitAtIndex(num: number, targetDigitIndex: number): number | null;
|
|
33
|
-
static getDimensionalIndex(num: number): number | null;
|
|
34
|
-
static isDuplicate(num: number, targetDigitIndex: number): boolean;
|
|
35
|
-
static isInactive(num: number): boolean;
|
|
36
|
-
static isPrimed(amount: number, leg: ActivityDuplex): boolean;
|
|
37
|
-
static verifyInteger(amount: number, leg: ActivityDuplex, stage: CollationStage): void;
|
|
38
|
-
static getDimensionsById(ancestors: string[], dad: string): Record<string, string>;
|
|
39
|
-
/**
|
|
40
|
-
* All non-trigger activities are assigned a status seed by their parent
|
|
41
|
-
*/
|
|
42
|
-
static getSeed(): string;
|
|
43
|
-
/**
|
|
44
|
-
* All trigger activities are assigned a status seed in a completed state
|
|
45
|
-
*/
|
|
46
|
-
static getTriggerSeed(): string;
|
|
47
|
-
/**
|
|
48
|
-
* entry point for compiler-type activities. This is called by the compiler
|
|
49
|
-
* to bind the sorted activity IDs to the trigger activity. These are then used
|
|
50
|
-
* at runtime by the activities to track job/activity status.
|
|
51
|
-
* @param graphs
|
|
52
|
-
*/
|
|
53
|
-
static compile(graphs: HotMeshGraph[]): void;
|
|
54
|
-
/**
|
|
55
|
-
* binds the ancestor array to each activity.
|
|
56
|
-
* Used in conjunction with the dimensional
|
|
57
|
-
* address (dad). If dad is `,0,1,0,0` and the
|
|
58
|
-
* ancestor array is `['t1', 'a1', 'a2']` for
|
|
59
|
-
* activity 'a3', then the SAVED DAD
|
|
60
|
-
* will always have the trailing
|
|
61
|
-
* 0's removed. This ensures that the addressing
|
|
62
|
-
* remains consistent even if the graph changes.
|
|
63
|
-
* id DAD SAVED DAD
|
|
64
|
-
* * t1 => ,0 => [empty]
|
|
65
|
-
* * a1 => ,0,1 => ,0,1
|
|
66
|
-
* * a2 => ,0,1,0 => ,0,1
|
|
67
|
-
* * a3 => ,0,1,0,0 => ,0,1
|
|
68
|
-
*
|
|
69
|
-
*/
|
|
70
|
-
static bindAncestorArray(graphs: HotMeshGraph[]): void;
|
|
71
|
-
static isActivityComplete(status: number): boolean;
|
|
72
|
-
}
|
|
73
|
-
export { CollatorService };
|