@@ -22,8 +22,8 @@ import (
2222 "github.com/hatchet-dev/hatchet/pkg/repository"
2323 "github.com/hatchet-dev/hatchet/pkg/repository/prisma/sqlchelpers"
2424 v2 "github.com/hatchet-dev/hatchet/pkg/repository/v2"
25+ "github.com/hatchet-dev/hatchet/pkg/repository/v2/olapv2"
2526 "github.com/hatchet-dev/hatchet/pkg/repository/v2/sqlcv2"
26- "github.com/hatchet-dev/hatchet/pkg/repository/v2/timescalev2"
2727)
2828
2929type OLAPController interface {
@@ -300,8 +300,8 @@ func (tc *OLAPControllerImpl) handleCreateMonitoringEvent(ctx context.Context, t
300300 retryCounts := make ([]int32 , 0 )
301301 workerIds := make ([]string , 0 )
302302 workflowIds := make ([]pgtype.UUID , 0 )
303- eventTypes := make ([]timescalev2 .V2EventTypeOlap , 0 )
304- readableStatuses := make ([]timescalev2 .V2ReadableStatusOlap , 0 )
303+ eventTypes := make ([]olapv2 .V2EventTypeOlap , 0 )
304+ readableStatuses := make ([]olapv2 .V2ReadableStatusOlap , 0 )
305305 eventPayloads := make ([]string , 0 )
306306 eventMessages := make ([]string , 0 )
307307 timestamps := make ([]pgtype.Timestamptz , 0 )
@@ -330,50 +330,50 @@ func (tc *OLAPControllerImpl) handleCreateMonitoringEvent(ctx context.Context, t
330330 }
331331
332332 switch msg .EventType {
333- case timescalev2 .V2EventTypeOlapRETRYING :
334- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapQUEUED )
335- case timescalev2 .V2EventTypeOlapREASSIGNED :
336- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapQUEUED )
337- case timescalev2 .V2EventTypeOlapRETRIEDBYUSER :
338- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapQUEUED )
339- case timescalev2 .V2EventTypeOlapCREATED :
340- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapQUEUED )
341- case timescalev2 .V2EventTypeOlapQUEUED :
342- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapQUEUED )
343- case timescalev2 .V2EventTypeOlapREQUEUEDNOWORKER :
344- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapQUEUED )
345- case timescalev2 .V2EventTypeOlapREQUEUEDRATELIMIT :
346- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapQUEUED )
347- case timescalev2 .V2EventTypeOlapASSIGNED :
348- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapRUNNING )
349- case timescalev2 .V2EventTypeOlapACKNOWLEDGED :
350- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapRUNNING )
351- case timescalev2 .V2EventTypeOlapSENTTOWORKER :
352- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapRUNNING )
353- case timescalev2 .V2EventTypeOlapSLOTRELEASED :
354- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapRUNNING )
355- case timescalev2 .V2EventTypeOlapSTARTED :
356- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapRUNNING )
357- case timescalev2 .V2EventTypeOlapTIMEOUTREFRESHED :
358- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapRUNNING )
359- case timescalev2 .V2EventTypeOlapSCHEDULINGTIMEDOUT :
360- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapFAILED )
361- case timescalev2 .V2EventTypeOlapFINISHED :
362- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapCOMPLETED )
363- case timescalev2 .V2EventTypeOlapFAILED :
364- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapFAILED )
365- case timescalev2 .V2EventTypeOlapCANCELLED :
366- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapCANCELLED )
367- case timescalev2 .V2EventTypeOlapTIMEDOUT :
368- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapFAILED )
369- case timescalev2 .V2EventTypeOlapRATELIMITERROR :
370- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapFAILED )
371- case timescalev2 .V2EventTypeOlapSKIPPED :
372- readableStatuses = append (readableStatuses , timescalev2 .V2ReadableStatusOlapCOMPLETED )
333+ case olapv2 .V2EventTypeOlapRETRYING :
334+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapQUEUED )
335+ case olapv2 .V2EventTypeOlapREASSIGNED :
336+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapQUEUED )
337+ case olapv2 .V2EventTypeOlapRETRIEDBYUSER :
338+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapQUEUED )
339+ case olapv2 .V2EventTypeOlapCREATED :
340+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapQUEUED )
341+ case olapv2 .V2EventTypeOlapQUEUED :
342+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapQUEUED )
343+ case olapv2 .V2EventTypeOlapREQUEUEDNOWORKER :
344+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapQUEUED )
345+ case olapv2 .V2EventTypeOlapREQUEUEDRATELIMIT :
346+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapQUEUED )
347+ case olapv2 .V2EventTypeOlapASSIGNED :
348+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapRUNNING )
349+ case olapv2 .V2EventTypeOlapACKNOWLEDGED :
350+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapRUNNING )
351+ case olapv2 .V2EventTypeOlapSENTTOWORKER :
352+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapRUNNING )
353+ case olapv2 .V2EventTypeOlapSLOTRELEASED :
354+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapRUNNING )
355+ case olapv2 .V2EventTypeOlapSTARTED :
356+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapRUNNING )
357+ case olapv2 .V2EventTypeOlapTIMEOUTREFRESHED :
358+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapRUNNING )
359+ case olapv2 .V2EventTypeOlapSCHEDULINGTIMEDOUT :
360+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapFAILED )
361+ case olapv2 .V2EventTypeOlapFINISHED :
362+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapCOMPLETED )
363+ case olapv2 .V2EventTypeOlapFAILED :
364+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapFAILED )
365+ case olapv2 .V2EventTypeOlapCANCELLED :
366+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapCANCELLED )
367+ case olapv2 .V2EventTypeOlapTIMEDOUT :
368+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapFAILED )
369+ case olapv2 .V2EventTypeOlapRATELIMITERROR :
370+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapFAILED )
371+ case olapv2 .V2EventTypeOlapSKIPPED :
372+ readableStatuses = append (readableStatuses , olapv2 .V2ReadableStatusOlapCOMPLETED )
373373 }
374374 }
375375
376- opts := make ([]timescalev2 .CreateTaskEventsOLAPParams , 0 )
376+ opts := make ([]olapv2 .CreateTaskEventsOLAPParams , 0 )
377377
378378 for i , taskId := range taskIds {
379379 var workerId pgtype.UUID
@@ -382,7 +382,7 @@ func (tc *OLAPControllerImpl) handleCreateMonitoringEvent(ctx context.Context, t
382382 workerId = sqlchelpers .UUIDFromStr (workerIds [i ])
383383 }
384384
385- event := timescalev2 .CreateTaskEventsOLAPParams {
385+ event := olapv2 .CreateTaskEventsOLAPParams {
386386 TenantID : sqlchelpers .UUIDFromStr (tenantId ),
387387 TaskID : taskId ,
388388 TaskInsertedAt : taskInsertedAts [i ],
@@ -395,11 +395,11 @@ func (tc *OLAPControllerImpl) handleCreateMonitoringEvent(ctx context.Context, t
395395 }
396396
397397 switch eventTypes [i ] {
398- case timescalev2 .V2EventTypeOlapFINISHED :
398+ case olapv2 .V2EventTypeOlapFINISHED :
399399 event .Output = []byte (eventPayloads [i ])
400- case timescalev2 .V2EventTypeOlapFAILED :
400+ case olapv2 .V2EventTypeOlapFAILED :
401401 event .ErrorMessage = sqlchelpers .TextFromStr (eventPayloads [i ])
402- case timescalev2 .V2EventTypeOlapCANCELLED :
402+ case olapv2 .V2EventTypeOlapCANCELLED :
403403 event .AdditionalEventMessage = sqlchelpers .TextFromStr (eventMessages [i ])
404404 }
405405
0 commit comments