Skip to content

Commit

Permalink
fix: update protoc to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
grutt committed Jan 27, 2024
1 parent 944ebfa commit c7c1097
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 318 deletions.
3 changes: 0 additions & 3 deletions typescript-sdk/hatchet/clients/admin/admin-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ describe('AdminClient', () => {
await client.put_workflow(workflow);

expect(existingSpy).toHaveBeenCalledWith({
tenantId: 'TENANT_ID',
name: 'workflow1',
});

Expand Down Expand Up @@ -245,7 +244,6 @@ describe('AdminClient', () => {
await client.put_workflow(workflow, { autoVersion: false });

expect(existingSpy).toHaveBeenCalledWith({
tenantId: 'TENANT_ID',
name: 'workflow1',
});

Expand Down Expand Up @@ -277,7 +275,6 @@ describe('AdminClient', () => {
});

expect(spy).toHaveBeenCalledWith({
tenantId: 'TENANT_ID',
workflowId: 'workflowId',
schedules: [now],
});
Expand Down
3 changes: 0 additions & 3 deletions typescript-sdk/hatchet/clients/admin/admin-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export class AdminClient {

try {
existing = await this.client.getWorkflowByName({
tenantId: this.config.tenant_id,
name: workflow.name,
});
} catch (e: any) {
Expand All @@ -70,7 +69,6 @@ export class AdminClient {

try {
await this.client.putWorkflow({
tenantId: this.config.tenant_id,
opts: workflow,
});
} catch (e: any) {
Expand All @@ -81,7 +79,6 @@ export class AdminClient {
schedule_workflow(workflowId: string, options?: { schedules?: Date[] }) {
try {
this.client.scheduleWorkflow({
tenantId: this.config.tenant_id,
workflowId,
schedules: options?.schedules,
});
Expand Down
2 changes: 0 additions & 2 deletions typescript-sdk/hatchet/clients/dispatcher/action-listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export class ActionListener {
await sleep(DEFAULT_ACTION_LISTENER_RETRY_INTERVAL);

this.listener = this.client.listen({
tenantId: this.config.tenant_id,
workerId: this.workerId,
});

Expand All @@ -83,7 +82,6 @@ export class ActionListener {
async unregister() {
try {
return this.client.unsubscribe({
tenantId: this.config.tenant_id,
workerId: this.workerId,
});
} catch (e: any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ describe('DispatcherClient', () => {
});

expect(clientSpy).toHaveBeenCalledWith({
tenantId: 'TENANT_ID',
workerName: 'WORKER_NAME',
services: ['SERVICE'],
actions: ['ACTION'],
});

expect(listenerSpy).toHaveBeenCalledWith({
tenantId: 'TENANT_ID',
workerId: 'WORKER_ID',
});

Expand All @@ -82,7 +80,6 @@ describe('DispatcherClient', () => {
});

client.send_action_event({
tenantId: 'TENANT_ID',
workerId: 'WORKER_ID',
actionId: 'ACTION_ID',
eventType: ActionEventType.STEP_EVENT_TYPE_COMPLETED,
Expand All @@ -95,7 +92,6 @@ describe('DispatcherClient', () => {
});

expect(clientSpy).toHaveBeenCalledWith({
tenantId: 'TENANT_ID',
workerId: 'WORKER_ID',
actionId: 'ACTION_ID',
eventType: ActionEventType.STEP_EVENT_TYPE_COMPLETED,
Expand All @@ -104,7 +100,7 @@ describe('DispatcherClient', () => {
jobRunId: 'b',
stepId: 'c',
stepRunId: 'd',
eventTimestamp: expect.any(Date),
eventTimestamp: expect.any(Object),
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@ export class DispatcherClient {
async get_action_listener(options: GetActionListenerOptions) {
// Register the worker
const registration = await this.client.register({
tenantId: this.config.tenant_id,
...options,
});

// Subscribe to the worker
const listener = this.client.listen({
tenantId: this.config.tenant_id,
workerId: registration.workerId,
});

Expand Down
1 change: 0 additions & 1 deletion typescript-sdk/hatchet/clients/event/event-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ describe('EventClient', () => {
client.push('type', { foo: 'bar' });

expect(clientSpy).toHaveBeenCalledWith({
tenantId: 'TENANT_ID',
key: 'type',
payload: '{"foo":"bar"}',
eventTimestamp: expect.any(Date),
Expand Down
1 change: 0 additions & 1 deletion typescript-sdk/hatchet/clients/event/event-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export class EventClient {

push<T>(type: string, input: T) {
const req: PushEventRequest = {
tenantId: this.config.tenant_id,
key: type,
payload: JSON.stringify(input),
eventTimestamp: new Date(),
Expand Down
2 changes: 0 additions & 2 deletions typescript-sdk/hatchet/clients/worker/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export class Worker {

get_action_event(action: Action, eventType: ActionEventType, payload: any = ''): ActionEvent {
return {
tenantId: action.tenantId,
workerId: this.name,
jobId: action.jobId,
jobRunId: action.jobRunId,
Expand Down Expand Up @@ -226,6 +225,5 @@ export class Worker {
if (retries > 5) {
throw new HatchetError('Could not start worker after 5 retries');
}
// await this.start(retryCount + 1);
}
}
Loading

0 comments on commit c7c1097

Please sign in to comment.