Skip to content

Instantly share code, notes, and snippets.

@adamruzicka
adamruzicka / scaling.md
Last active October 30, 2020 14:36
Dynflow workers scaling

Intro

Out of the box, foreman ships with orchestrator and a single worker If you have Katello, you will get an additional worker for processing of the host queue

root@modest-gator:~# ls -l /etc/foreman/dynflow/
total 1
-rw-r--r--. 1 root foreman 51 May 14 07:35 orchestrator.yml
-rw-r--r--. 1 root foreman 59 May 14 07:35 worker.yml
# /usr/share/foreman/config/initializers/foreman-tasks-db-pool-size.rb
ForemanTasks.dynflow.config.db_pool_size = 30
@adamruzicka
adamruzicka / gist:b6b19d08e2bdce828fa3ca22eda97fb6
Created January 9, 2020 11:34
Removing undeliverable dynflow envelopes
--
-- Delete all undeliverable envelopes
--
DELETE FROM dynflow_envelopes
WHERE receiver_id NOT IN (SELECT id FROM dynflow_coordinator_records);
import asyncio
import json
class ResponseQueue(asyncio.Queue):
def __init__(self, *args, **kwargs):
self.done = False
super().__init__(*args, **kwargs)
source 'https://rubygems.org'
gem 'daemons'
Warning: Encountered two children with the same key, `.$secondary_»Environments«`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
in ul (created by ListGroup)
in ListGroup (created by BaseVerticalNavItemHelper)
in Unknown (created by withContext(Component))
in withContext(Component) (created by BaseVerticalNavItemHelper)
in div (created by BaseVerticalNavItemHelper)
in li (created by ListGroupItem)
in ListGroupItem (created by BaseVerticalNavItemHelper)
in BaseVerticalNavItemHelper (created by VerticalNavItemHelper)
in VerticalNavItemHelper (created by BaseVerticalNavItem)
diff --git a/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb b/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
index 887725d..3c59a22 100644
--- a/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
+++ b/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
@@ -42,7 +42,7 @@ module Actions
unless (restored_id = action.input[:current_request_id]).nil?
old_id = ::Logging.mdc['request']
if !old_id.nil? && old_id != restored_id
- action.action_logger.warn(_('Changing request id %{request_id} to saved id %{saved_id}') % { :saved_id => restored_id, :request_id => old_id })
+ action.action_logger.warn('Changing request id %{request_id} to saved id %{saved_id}' % { :saved_id => restored_id, :request_id => old_id })
From 8f229a0a92ff5e490a1dc30e79477bcfb9a1b6ba Mon Sep 17 00:00:00 2001
From: Adam Ruzicka <[email protected]>
Date: Tue, 9 Apr 2019 16:46:26 +0200
Subject: [PATCH] example
---
lib/smart_proxy_dynflow_core/log.rb | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/lib/smart_proxy_dynflow_core/log.rb b/lib/smart_proxy_dynflow_core/log.rb
# app/lib/actions/my_action.rb
module Actions
class FailAction < Actions::EntryAction
def run
error! "This is an error"
end
def troubleshooting_info
ForemanTasks::TroubleshootingHelpGenerator::Info.new.tap do |i|
i.add_line _('This task requires special handling.')
;; in dotspacemacs/user-config
(seq visual-fill-column-center-text t)
(add-to-list 'org-journal-mode-hook 'visual-fill-column-mode)