Skip to content

Commit 9db75c5

Browse files
committed
feat: add storage adapter for hulylake
Signed-off-by: Alexander Onnikov <[email protected]>
1 parent c235d0d commit 9db75c5

File tree

31 files changed

+793
-110
lines changed

31 files changed

+793
-110
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 36 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/prod/public/config-dev.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"PUBLIC_SCHEDULE_URL": "https://schedule.hc.engineering",
1313
"CALDAV_SERVER_URL": "https://caldav.hc.engineering",
1414
"BACKUP_URL": "https://front.hc.engineering/api/backup",
15+
"HULYLAKE_URL": "https://lake.hc.engineering",
1516
"PULSE_URL": "wss://pulse.hc.engineering/ws",
1617
"COMMUNICATION_API_ENABLED": "true",
1718
"FILES_URL": "https://datalake.hc.engineering/blob/:workspace/:blobId/:filename"

dev/tool/src/communication.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// limitations under the License.
1313

1414
import { type Workspace } from '@hcengineering/account'
15-
import { type HulylakeClient, type JsonPatch } from '@hcengineering/hulylake-client'
15+
import { type HulylakeWorkspaceClient, type JsonPatch } from '@hcengineering/hulylake-client'
1616
import type postgres from 'postgres'
1717
import {
1818
generateUuid,
@@ -60,7 +60,7 @@ export async function migrateWorkspaceMessages (
6060
ws: Workspace,
6161
card: CardID | undefined,
6262
db: postgres.Sql,
63-
hulylake: HulylakeClient,
63+
hulylake: HulylakeWorkspaceClient,
6464
accountClient: AccountClient,
6565
personUuidBySocialId: Map<PersonId, PersonUuid>
6666
): Promise<void> {
@@ -72,7 +72,7 @@ async function migrateMessages (
7272
ws: Workspace,
7373
card: CardID | undefined,
7474
db: postgres.Sql,
75-
hulylake: HulylakeClient,
75+
hulylake: HulylakeWorkspaceClient,
7676
accountClient: AccountClient,
7777
personUuidBySocialId: Map<PersonId, PersonUuid>
7878
): Promise<void> {
@@ -105,7 +105,7 @@ async function migrateMessages (
105105
async function migrateMessagesBatch (
106106
ctx: MeasureContext,
107107
cardId: CardID,
108-
hulylake: HulylakeClient,
108+
hulylake: HulylakeWorkspaceClient,
109109
accountClient: AccountClient,
110110
personUuidBySocialId: Map<PersonId, PersonUuid>,
111111
messages: OldMessage[]
@@ -161,7 +161,11 @@ async function migrateMessagesBatch (
161161
}
162162
}
163163

164-
async function getGroups (ctx: MeasureContext, hulylake: HulylakeClient, cardId: CardID): Promise<MessagesGroup[]> {
164+
async function getGroups (
165+
ctx: MeasureContext,
166+
hulylake: HulylakeWorkspaceClient,
167+
cardId: CardID
168+
): Promise<MessagesGroup[]> {
165169
const res = await hulylake.getJson<MessagesGroupsDoc>(`${cardId}/messages/groups`, {
166170
maxRetries: 3,
167171
isRetryable: () => true,

dev/tool/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import {
5656
type Account as OldAccount,
5757
type Workspace as OldWorkspace
5858
} from '@hcengineering/account-service'
59-
import { getClient as getHulylakeClient } from '@hcengineering/hulylake-client'
59+
import { getWorkspaceClient as getHulylakeClient } from '@hcengineering/hulylake-client'
6060
import {
6161
getDBClient,
6262
createPostgreeDestroyAdapter,

0 commit comments

Comments
 (0)