|
1 | 1 | from django.apps import AppConfig |
2 | 2 |
|
3 | | -from baserow.core.feature_flags import FF_AUTOMATION, feature_flag_is_enabled |
4 | | - |
5 | 3 |
|
6 | 4 | class AutomationConfig(AppConfig): |
7 | 5 | name = "baserow.contrib.automation" |
@@ -102,122 +100,112 @@ def ready(self): |
102 | 100 | ) |
103 | 101 | from baserow.core.trash.registries import trash_item_type_registry |
104 | 102 |
|
105 | | - if feature_flag_is_enabled(FF_AUTOMATION): |
106 | | - application_type_registry.register(AutomationApplicationType()) |
107 | | - |
108 | | - object_scope_type_registry.register(AutomationObjectScopeType()) |
109 | | - object_scope_type_registry.register(AutomationWorkflowObjectScopeType()) |
110 | | - object_scope_type_registry.register(AutomationNodeObjectScopeType()) |
111 | | - |
112 | | - operation_type_registry.register(CreateAutomationWorkflowOperationType()) |
113 | | - operation_type_registry.register(DeleteAutomationWorkflowOperationType()) |
114 | | - operation_type_registry.register(DuplicateAutomationWorkflowOperationType()) |
115 | | - operation_type_registry.register(ReadAutomationWorkflowOperationType()) |
116 | | - operation_type_registry.register(UpdateAutomationWorkflowOperationType()) |
117 | | - operation_type_registry.register(ListAutomationWorkflowsOperationType()) |
118 | | - operation_type_registry.register(OrderAutomationWorkflowsOperationType()) |
119 | | - operation_type_registry.register(RestoreAutomationWorkflowOperationType()) |
120 | | - operation_type_registry.register(PublishAutomationWorkflowOperationType()) |
121 | | - operation_type_registry.register(ListAutomationNodeOperationType()) |
122 | | - operation_type_registry.register(CreateAutomationNodeOperationType()) |
123 | | - operation_type_registry.register(UpdateAutomationNodeOperationType()) |
124 | | - operation_type_registry.register(ReadAutomationNodeOperationType()) |
125 | | - operation_type_registry.register(DeleteAutomationNodeOperationType()) |
126 | | - operation_type_registry.register(RestoreAutomationNodeOperationType()) |
127 | | - operation_type_registry.register(DuplicateAutomationNodeOperationType()) |
128 | | - operation_type_registry.register(OrderAutomationNodeOperationType()) |
129 | | - |
130 | | - job_type_registry.register(DuplicateAutomationWorkflowJobType()) |
131 | | - job_type_registry.register(PublishAutomationWorkflowJobType()) |
132 | | - |
133 | | - trash_item_type_registry.register(AutomationTrashableItemType()) |
134 | | - trash_item_type_registry.register(AutomationWorkflowTrashableItemType()) |
135 | | - trash_item_type_registry.register(AutomationNodeTrashableItemType()) |
136 | | - |
137 | | - action_type_registry.register(CreateAutomationWorkflowActionType()) |
138 | | - action_type_registry.register(UpdateAutomationWorkflowActionType()) |
139 | | - action_type_registry.register(DeleteAutomationWorkflowActionType()) |
140 | | - action_type_registry.register(DuplicateAutomationWorkflowActionType()) |
141 | | - action_type_registry.register(OrderAutomationWorkflowActionType()) |
142 | | - action_type_registry.register(CreateAutomationNodeActionType()) |
143 | | - action_type_registry.register(UpdateAutomationNodeActionType()) |
144 | | - action_type_registry.register(DeleteAutomationNodeActionType()) |
145 | | - action_type_registry.register(DuplicateAutomationNodeActionType()) |
146 | | - action_type_registry.register(ReplaceAutomationNodeActionType()) |
147 | | - action_type_registry.register(MoveAutomationNodeActionType()) |
148 | | - |
149 | | - action_scope_registry.register(WorkflowActionScopeType()) |
150 | | - |
151 | | - automation_node_type_registry.register(LocalBaserowCreateRowNodeType()) |
152 | | - automation_node_type_registry.register(LocalBaserowUpdateRowNodeType()) |
153 | | - automation_node_type_registry.register(LocalBaserowDeleteRowNodeType()) |
154 | | - automation_node_type_registry.register(LocalBaserowGetRowNodeType()) |
155 | | - automation_node_type_registry.register(LocalBaserowListRowsNodeType()) |
156 | | - automation_node_type_registry.register(LocalBaserowAggregateRowsNodeType()) |
157 | | - automation_node_type_registry.register(CoreHttpRequestNodeType()) |
158 | | - automation_node_type_registry.register(CoreIteratorNodeType()) |
159 | | - automation_node_type_registry.register(CoreSMTPEmailNodeType()) |
160 | | - automation_node_type_registry.register(CoreRouterActionNodeType()) |
161 | | - automation_node_type_registry.register( |
162 | | - LocalBaserowRowsCreatedNodeTriggerType() |
163 | | - ) |
164 | | - automation_node_type_registry.register( |
165 | | - LocalBaserowRowsUpdatedNodeTriggerType() |
166 | | - ) |
167 | | - automation_node_type_registry.register( |
168 | | - LocalBaserowRowsDeletedNodeTriggerType() |
169 | | - ) |
170 | | - automation_node_type_registry.register(CorePeriodicTriggerNodeType()) |
171 | | - automation_node_type_registry.register(SlackWriteMessageActionNodeType()) |
172 | | - automation_node_type_registry.register(CoreHTTPTriggerNodeType()) |
173 | | - automation_node_type_registry.register(AIAgentActionNodeType()) |
174 | | - |
175 | | - from baserow.core.trash.registries import trash_operation_type_registry |
176 | | - |
177 | | - trash_operation_type_registry.register( |
178 | | - ReplaceAutomationNodeTrashOperationType() |
179 | | - ) |
180 | | - |
181 | | - from baserow.contrib.automation.data_providers.data_provider_types import ( |
182 | | - CurrentIterationDataProviderType, |
183 | | - PreviousNodeProviderType, |
184 | | - ) |
185 | | - from baserow.contrib.automation.data_providers.registries import ( |
186 | | - automation_data_provider_type_registry, |
187 | | - ) |
188 | | - |
189 | | - automation_data_provider_type_registry.register(PreviousNodeProviderType()) |
190 | | - automation_data_provider_type_registry.register( |
191 | | - CurrentIterationDataProviderType() |
192 | | - ) |
193 | | - |
194 | | - from baserow.contrib.automation.nodes.permission_manager import ( |
195 | | - AutomationNodePermissionManager, |
196 | | - ) |
197 | | - from baserow.contrib.automation.workflows.permission_manager import ( |
198 | | - AutomationWorkflowPermissionManager, |
199 | | - ) |
200 | | - from baserow.core.registries import permission_manager_type_registry |
201 | | - |
202 | | - permission_manager_type_registry.register( |
203 | | - AutomationWorkflowPermissionManager() |
204 | | - ) |
205 | | - permission_manager_type_registry.register(AutomationNodePermissionManager()) |
206 | | - |
207 | | - # The signals must always be imported last because they use |
208 | | - # the registries which need to be filled first. |
209 | | - import baserow.contrib.automation.nodes.ws.signals # noqa: F403, F401 |
210 | | - import baserow.contrib.automation.workflows.signals # noqa: F403, F401 |
211 | | - import baserow.contrib.automation.workflows.ws.signals # noqa: F403, F401 |
212 | | - import baserow.contrib.integrations.tasks # noqa: F403, F401 |
213 | | - from baserow.contrib.automation.nodes.receivers import ( |
214 | | - connect_to_node_pre_delete_signal, |
215 | | - ) |
216 | | - |
217 | | - connect_to_node_pre_delete_signal() |
| 103 | + application_type_registry.register(AutomationApplicationType()) |
| 104 | + |
| 105 | + object_scope_type_registry.register(AutomationObjectScopeType()) |
| 106 | + object_scope_type_registry.register(AutomationWorkflowObjectScopeType()) |
| 107 | + object_scope_type_registry.register(AutomationNodeObjectScopeType()) |
| 108 | + |
| 109 | + operation_type_registry.register(CreateAutomationWorkflowOperationType()) |
| 110 | + operation_type_registry.register(DeleteAutomationWorkflowOperationType()) |
| 111 | + operation_type_registry.register(DuplicateAutomationWorkflowOperationType()) |
| 112 | + operation_type_registry.register(ReadAutomationWorkflowOperationType()) |
| 113 | + operation_type_registry.register(UpdateAutomationWorkflowOperationType()) |
| 114 | + operation_type_registry.register(ListAutomationWorkflowsOperationType()) |
| 115 | + operation_type_registry.register(OrderAutomationWorkflowsOperationType()) |
| 116 | + operation_type_registry.register(RestoreAutomationWorkflowOperationType()) |
| 117 | + operation_type_registry.register(PublishAutomationWorkflowOperationType()) |
| 118 | + operation_type_registry.register(ListAutomationNodeOperationType()) |
| 119 | + operation_type_registry.register(CreateAutomationNodeOperationType()) |
| 120 | + operation_type_registry.register(UpdateAutomationNodeOperationType()) |
| 121 | + operation_type_registry.register(ReadAutomationNodeOperationType()) |
| 122 | + operation_type_registry.register(DeleteAutomationNodeOperationType()) |
| 123 | + operation_type_registry.register(RestoreAutomationNodeOperationType()) |
| 124 | + operation_type_registry.register(DuplicateAutomationNodeOperationType()) |
| 125 | + operation_type_registry.register(OrderAutomationNodeOperationType()) |
| 126 | + |
| 127 | + job_type_registry.register(DuplicateAutomationWorkflowJobType()) |
| 128 | + job_type_registry.register(PublishAutomationWorkflowJobType()) |
| 129 | + |
| 130 | + trash_item_type_registry.register(AutomationTrashableItemType()) |
| 131 | + trash_item_type_registry.register(AutomationWorkflowTrashableItemType()) |
| 132 | + trash_item_type_registry.register(AutomationNodeTrashableItemType()) |
| 133 | + |
| 134 | + action_type_registry.register(CreateAutomationWorkflowActionType()) |
| 135 | + action_type_registry.register(UpdateAutomationWorkflowActionType()) |
| 136 | + action_type_registry.register(DeleteAutomationWorkflowActionType()) |
| 137 | + action_type_registry.register(DuplicateAutomationWorkflowActionType()) |
| 138 | + action_type_registry.register(OrderAutomationWorkflowActionType()) |
| 139 | + action_type_registry.register(CreateAutomationNodeActionType()) |
| 140 | + action_type_registry.register(UpdateAutomationNodeActionType()) |
| 141 | + action_type_registry.register(DeleteAutomationNodeActionType()) |
| 142 | + action_type_registry.register(DuplicateAutomationNodeActionType()) |
| 143 | + action_type_registry.register(ReplaceAutomationNodeActionType()) |
| 144 | + action_type_registry.register(MoveAutomationNodeActionType()) |
| 145 | + |
| 146 | + action_scope_registry.register(WorkflowActionScopeType()) |
| 147 | + |
| 148 | + automation_node_type_registry.register(LocalBaserowCreateRowNodeType()) |
| 149 | + automation_node_type_registry.register(LocalBaserowUpdateRowNodeType()) |
| 150 | + automation_node_type_registry.register(LocalBaserowDeleteRowNodeType()) |
| 151 | + automation_node_type_registry.register(LocalBaserowGetRowNodeType()) |
| 152 | + automation_node_type_registry.register(LocalBaserowListRowsNodeType()) |
| 153 | + automation_node_type_registry.register(LocalBaserowAggregateRowsNodeType()) |
| 154 | + automation_node_type_registry.register(CoreHttpRequestNodeType()) |
| 155 | + automation_node_type_registry.register(CoreIteratorNodeType()) |
| 156 | + automation_node_type_registry.register(CoreSMTPEmailNodeType()) |
| 157 | + automation_node_type_registry.register(CoreRouterActionNodeType()) |
| 158 | + automation_node_type_registry.register(LocalBaserowRowsCreatedNodeTriggerType()) |
| 159 | + automation_node_type_registry.register(LocalBaserowRowsUpdatedNodeTriggerType()) |
| 160 | + automation_node_type_registry.register(LocalBaserowRowsDeletedNodeTriggerType()) |
| 161 | + automation_node_type_registry.register(CorePeriodicTriggerNodeType()) |
| 162 | + automation_node_type_registry.register(CoreHTTPTriggerNodeType()) |
| 163 | + automation_node_type_registry.register(AIAgentActionNodeType()) |
| 164 | + automation_node_type_registry.register(SlackWriteMessageActionNodeType()) |
| 165 | + |
| 166 | + from baserow.core.trash.registries import trash_operation_type_registry |
| 167 | + |
| 168 | + trash_operation_type_registry.register( |
| 169 | + ReplaceAutomationNodeTrashOperationType() |
| 170 | + ) |
218 | 171 |
|
219 | | - from baserow.core.search.registries import workspace_search_registry |
| 172 | + from baserow.contrib.automation.data_providers.data_provider_types import ( |
| 173 | + CurrentIterationDataProviderType, |
| 174 | + PreviousNodeProviderType, |
| 175 | + ) |
| 176 | + from baserow.contrib.automation.data_providers.registries import ( |
| 177 | + automation_data_provider_type_registry, |
| 178 | + ) |
| 179 | + |
| 180 | + automation_data_provider_type_registry.register(PreviousNodeProviderType()) |
| 181 | + automation_data_provider_type_registry.register( |
| 182 | + CurrentIterationDataProviderType() |
| 183 | + ) |
220 | 184 |
|
221 | | - from .search_types import AutomationSearchType |
| 185 | + from baserow.contrib.automation.nodes.permission_manager import ( |
| 186 | + AutomationNodePermissionManager, |
| 187 | + ) |
| 188 | + from baserow.contrib.automation.workflows.permission_manager import ( |
| 189 | + AutomationWorkflowPermissionManager, |
| 190 | + ) |
| 191 | + from baserow.core.registries import permission_manager_type_registry |
| 192 | + |
| 193 | + permission_manager_type_registry.register(AutomationWorkflowPermissionManager()) |
| 194 | + permission_manager_type_registry.register(AutomationNodePermissionManager()) |
| 195 | + |
| 196 | + # The signals must always be imported last because they use |
| 197 | + # the registries which need to be filled first. |
| 198 | + import baserow.contrib.automation.nodes.ws.signals # noqa: F403, F401 |
| 199 | + import baserow.contrib.automation.workflows.signals # noqa: F403, F401 |
| 200 | + import baserow.contrib.automation.workflows.ws.signals # noqa: F403, F401 |
| 201 | + import baserow.contrib.integrations.tasks # noqa: F403, F401 |
| 202 | + from baserow.contrib.automation.nodes.receivers import ( |
| 203 | + connect_to_node_pre_delete_signal, |
| 204 | + ) |
| 205 | + |
| 206 | + connect_to_node_pre_delete_signal() |
| 207 | + |
| 208 | + from baserow.contrib.automation.search_types import AutomationSearchType |
| 209 | + from baserow.core.search.registries import workspace_search_registry |
222 | 210 |
|
223 | 211 | workspace_search_registry.register(AutomationSearchType()) |
0 commit comments