Skip to content

Commit

Permalink
Merge branch 'main' into feat/grafana-dash
Browse files Browse the repository at this point in the history
Signed-off-by: Tal <[email protected]>
  • Loading branch information
talboren authored Dec 27, 2024
2 parents 6cd31e7 + 5c4ab0f commit 62052b3
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -218,4 +218,4 @@ providers_cache.json
tests/provision/*
grafana/*
!grafana/provisioning/
!grafana/dashboards/
!grafana/dashboards/
2 changes: 1 addition & 1 deletion keep-ui/app/(keep)/providers/provider-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ const ProviderForm = ({

<div className="w-full mt-2" key="install_webhook">
{provider.can_setup_webhook && !installedProvidersMode && (
<div className={`${isLocalhost ? "bg-gray-100 p-2" : ""}`}>
<div className={`${isLocalhost ? "bg-gray-100 p-2 rounded-tremor-default" : ""}`}>
<div className="flex items-center">
<input
type="checkbox"
Expand Down
1 change: 0 additions & 1 deletion keep/api/core/demo_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ async def simulate_alerts_async(
logger.info(
"Sleeping for {} seconds before next iteration".format(sleep_interval)
)
# await asyncio.sleep(sleep_interval)


def launch_demo_mode_thread(
Expand Down
6 changes: 6 additions & 0 deletions keep/api/routes/alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
logger = logging.getLogger(__name__)

REDIS = os.environ.get("REDIS", "false") == "true"
EVENT_WORKERS = int(config("KEEP_EVENT_WORKERS", default=50, cast=int))

# Create dedicated threadpool
process_event_executor = ThreadPoolExecutor(
max_workers=EVENT_WORKERS, thread_name_prefix="process_event_worker"
)

# Create dedicated threadpool
process_event_executor = ThreadPoolExecutor(
Expand Down
5 changes: 4 additions & 1 deletion keep/workflowmanager/workflowscheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ def __init__(self, workflow_manager):
self.interval_enabled = (
config("WORKFLOWS_INTERVAL_ENABLED", default="true") == "true"
)
self.executor = ThreadPoolExecutor(max_workers=self.MAX_WORKERS)
self.executor = ThreadPoolExecutor(
max_workers=self.MAX_WORKERS,
thread_name_prefix="WorkflowScheduler",
)
self.scheduler_future = None
self.futures = set()
# Initialize metrics for queue size
Expand Down
6 changes: 5 additions & 1 deletion tests/test_workflow_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,11 @@ def test_workflow_execution_with_disabled_workflow(
count = 0

while (
enabled_workflow_execution is None and disabled_workflow_execution is None
(
enabled_workflow_execution is None
or enabled_workflow_execution.status == "in_progress"
)
and disabled_workflow_execution is None
) and count < 30:
enabled_workflow_execution = get_last_workflow_execution_by_workflow_id(
SINGLE_TENANT_UUID, enabled_id
Expand Down

0 comments on commit 62052b3

Please sign in to comment.