server: event trigger log cleanup | rename start_event_trigger_cleanups API

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5976
GitOrigin-RevId: 752c905d31b3700aa49d816ec573df74715f6654
This commit is contained in:
paritosh-08 2022-09-21 11:29:14 +05:30 committed by hasura-bot
parent dc9a86680c
commit 876c906660
3 changed files with 8 additions and 8 deletions

View File

@ -34,7 +34,7 @@ module Hasura.RQL.DDL.EventTrigger
cetqResponseTrasnform,
cteqCleanupConfig,
runCleanupEventTriggerLog,
runEventTriggerStartCleanup,
runEventTriggerResumeCleanup,
runEventTriggerPauseCleanup,
MonadEventLogCleanup (..),
getAllEventTriggersWithCleanupConfig,
@ -612,12 +612,12 @@ toggleEventTriggerCleanupAction conf cleanupSwitch = do
onJust (etiCleanupConfig eventTriggerInfo) $ \cleanupConfig ->
updateCleanupStatusInMetadata @b cleanupConfig switch sourceName tableName triggerName
runEventTriggerStartCleanup ::
runEventTriggerResumeCleanup ::
forall m.
(MonadIO m, QErrM m, CacheRWM m, MetadataM m) =>
TriggerLogCleanupToggleConfig ->
m EncJSON
runEventTriggerStartCleanup conf = toggleEventTriggerCleanupAction conf ETCSUnpaused
runEventTriggerResumeCleanup conf = toggleEventTriggerCleanupAction conf ETCSUnpaused
runEventTriggerPauseCleanup ::
(MonadError QErr m, CacheRWM m, MonadIO m, MetadataM m) =>

View File

@ -130,7 +130,7 @@ data RQLMetadataV1
| RMRedeliverEvent !(AnyBackend RedeliverEventQuery)
| RMInvokeEventTrigger !(AnyBackend InvokeEventTriggerQuery)
| RMCleanupEventTriggerLog !TriggerLogCleanupConfig
| RMStartEventTriggerCleanup !TriggerLogCleanupToggleConfig
| RMResumeEventTriggerCleanup !TriggerLogCleanupToggleConfig
| RMPauseEventTriggerCleanup !TriggerLogCleanupToggleConfig
| -- Remote schemas
RMAddRemoteSchema !AddRemoteSchemaQuery
@ -230,7 +230,7 @@ instance FromJSON RQLMetadataV1 where
"update_remote_schema_remote_relationship" -> RMUpdateRemoteSchemaRemoteRelationship <$> args
"delete_remote_schema_remote_relationship" -> RMDeleteRemoteSchemaRemoteRelationship <$> args
"cleanup_event_trigger_logs" -> RMCleanupEventTriggerLog <$> args
"start_event_trigger_cleanups" -> RMStartEventTriggerCleanup <$> args
"resume_event_trigger_cleanups" -> RMResumeEventTriggerCleanup <$> args
"pause_event_trigger_cleanups" -> RMPauseEventTriggerCleanup <$> args
"create_cron_trigger" -> RMCreateCronTrigger <$> args
"delete_cron_trigger" -> RMDeleteCronTrigger <$> args
@ -469,7 +469,7 @@ queryModifiesMetadata = \case
RMCreateEventTrigger _ -> True
RMDeleteEventTrigger _ -> True
RMCleanupEventTriggerLog _ -> True
RMStartEventTriggerCleanup _ -> True
RMResumeEventTriggerCleanup _ -> True
RMPauseEventTriggerCleanup _ -> True
RMAddRemoteSchema _ -> True
RMUpdateRemoteSchema _ -> True
@ -616,7 +616,7 @@ runMetadataQueryV1M env currentResourceVersion = \case
RMRedeliverEvent q -> dispatchEventTrigger runRedeliverEvent q
RMInvokeEventTrigger q -> dispatchEventTrigger runInvokeEventTrigger q
RMCleanupEventTriggerLog q -> runCleanupEventTriggerLog q
RMStartEventTriggerCleanup q -> runEventTriggerStartCleanup q
RMResumeEventTriggerCleanup q -> runEventTriggerResumeCleanup q
RMPauseEventTriggerCleanup q -> runEventTriggerPauseCleanup q
RMAddRemoteSchema q -> runAddRemoteSchema env q
RMUpdateRemoteSchema q -> runUpdateRemoteSchema env q

View File

@ -85,7 +85,7 @@ data RQLMetadataV1
| RMRedeliverEvent !(AnyBackend RedeliverEventQuery)
| RMInvokeEventTrigger !(AnyBackend InvokeEventTriggerQuery)
| RMCleanupEventTriggerLog !TriggerLogCleanupConfig
| RMStartEventTriggerCleanup !TriggerLogCleanupToggleConfig
| RMResumeEventTriggerCleanup !TriggerLogCleanupToggleConfig
| RMPauseEventTriggerCleanup !TriggerLogCleanupToggleConfig
| -- Remote schemas
RMAddRemoteSchema !AddRemoteSchemaQuery