repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/world.rb
lib/dynflow/world.rb
# -*- coding: utf-8 -*- # frozen_string_literal: true require 'dynflow/world/invalidation' module Dynflow # rubocop:disable Metrics/ClassLength class World include Algebrick::TypeCheck include Algebrick::Matching include Invalidation attr_reader :id, :config, :client_dispatcher, :executor_dispatc...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/utils.rb
lib/dynflow/utils.rb
# frozen_string_literal: true module Dynflow module Utils require 'dynflow/utils/indifferent_hash' require 'dynflow/utils/priority_queue' def self.validate_keys!(hash, *valid_keys) valid_keys.flatten! unexpected_options = hash.keys - valid_keys - valid_keys.map(&:to_s) unless unexpecte...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/actors.rb
lib/dynflow/actors.rb
# frozen_string_literal: true module Dynflow module Actors require 'dynflow/actors/execution_plan_cleaner' end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/web_console.rb
lib/dynflow/web_console.rb
# frozen_string_literal: true require 'dynflow/web' warn %{"require 'dynflow/web_console'" is deprecated, use "require 'dynflow/web'" instead} Dynflow::WebConsole = Dynflow::Web
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/serializer.rb
lib/dynflow/serializer.rb
# frozen_string_literal: true require 'algebrick/serializer' module Dynflow def self.serializer @serializer ||= Serializer.new end class Serializer < Algebrick::Serializer ARBITRARY_TYPE_KEY = :class MARSHAL_KEY = :marshaled def load(data, options = {}) case data when ::Arra...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/round_robin.rb
lib/dynflow/round_robin.rb
# frozen_string_literal: true module Dynflow # A simple round-robin scheduling implementation used at various # places in Dynflow class RoundRobin def initialize @data = [] @cursor = 0 end def add(item) @data.push item self end def delete(item) @data.delete i...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_plan.rb
lib/dynflow/execution_plan.rb
# frozen_string_literal: true require 'securerandom' module Dynflow # rubocop:disable Metrics/ClassLength # TODO extract planning logic to an extra class ExecutionPlanner class ExecutionPlan < Serializable # a fallback object representing a plan with some corrupted data, # preventing to load the whole p...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/delayed_executors.rb
lib/dynflow/delayed_executors.rb
# frozen_string_literal: true module Dynflow module DelayedExecutors require 'dynflow/delayed_executors/abstract' require 'dynflow/delayed_executors/abstract_core' require 'dynflow/delayed_executors/polling' end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors.rb
lib/dynflow/executors.rb
# frozen_string_literal: true module Dynflow module Executors require 'dynflow/executors/parallel' class << self # Every time we run a code that can be defined outside of Dynflow, # we should wrap it with this method, and we can ensure here to do # necessary cleanup, such as cleaning Activ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/actor.rb
lib/dynflow/actor.rb
# frozen_string_literal: true module Dynflow FULL_BACKTRACE = %w[1 y yes].include?((ENV['DYNFLOW_FULL_BACKTRACE'] || '').downcase) BACKTRACE_LIMIT = begin limit = ENV['DYNFLOW_BACKTRACE_LIMIT'].to_i limit.zero? ? nil : limit end module MethodicActo...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/dispatcher.rb
lib/dynflow/dispatcher.rb
# frozen_string_literal: true module Dynflow module Dispatcher Request = Algebrick.type do Event = type do fields! execution_plan_id: String, step_id: Integer, event: Object, time: type { variants Time, NilClass }, ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters.rb
lib/dynflow/persistence_adapters.rb
# frozen_string_literal: true module Dynflow module PersistenceAdapters require 'dynflow/persistence_adapters/abstract' require 'dynflow/persistence_adapters/sequel' end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/config.rb
lib/dynflow/config.rb
# frozen_string_literal: true require 'socket' module Dynflow class Config include Algebrick::TypeCheck def self.config_attr(name, *types, &default) self.send(:define_method, "validate_#{name}!") do |value| Type! value, *types unless types.empty? end self.send(:define_method, name...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/telemetry.rb
lib/dynflow/telemetry.rb
# frozen_string_literal: true require 'dynflow/telemetry_adapters/abstract' require 'dynflow/telemetry_adapters/dummy' require 'dynflow/telemetry_adapters/statsd' module Dynflow class Telemetry class << self attr_reader :instance # Configures the adapter to use for telemetry # # @param ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/web.rb
lib/dynflow/web.rb
# frozen_string_literal: true require 'dynflow' require 'pp' require 'sinatra/base' require 'yaml' module Dynflow module Web def self.setup(&block) console = Sinatra.new(Web::Console) { instance_exec(&block) } Rack::Builder.app do run Rack::URLMap.new('/' => console) end end d...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/semaphores.rb
lib/dynflow/semaphores.rb
# frozen_string_literal: true module Dynflow module Semaphores require 'dynflow/semaphores/abstract' require 'dynflow/semaphores/stateful' require 'dynflow/semaphores/aggregating' require 'dynflow/semaphores/dummy' end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/connectors.rb
lib/dynflow/connectors.rb
# frozen_string_literal: true module Dynflow module Connectors require 'dynflow/connectors/abstract' require 'dynflow/connectors/direct' require 'dynflow/connectors/database' end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/serializers.rb
lib/dynflow/serializers.rb
# frozen_string_literal: true module Dynflow module Serializers require 'dynflow/serializers/abstract' require 'dynflow/serializers/noop' end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/logger_adapters.rb
lib/dynflow/logger_adapters.rb
# frozen_string_literal: true module Dynflow module LoggerAdapters require 'dynflow/logger_adapters/formatters' require 'dynflow/logger_adapters/abstract' require 'dynflow/logger_adapters/simple' require 'dynflow/logger_adapters/delegator' end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/dead_letter_silencer.rb
lib/dynflow/dead_letter_silencer.rb
# frozen_string_literal: true module Dynflow class DeadLetterSilencer < Concurrent::Actor::DefaultDeadLetterHandler def initialize(matchers) @matchers = Type! matchers, Array end def should_drop?(dead_letter) @matchers.any? { |matcher| matcher.match? dead_letter } end def on_message...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/transaction_adapters.rb
lib/dynflow/transaction_adapters.rb
# frozen_string_literal: true module Dynflow module TransactionAdapters require 'dynflow/transaction_adapters/abstract' require 'dynflow/transaction_adapters/none' require 'dynflow/transaction_adapters/active_record' end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action.rb
lib/dynflow/action.rb
# frozen_string_literal: true module Dynflow # rubocop:disable Metrics/ClassLength class Action < Serializable OutputReference = ExecutionPlan::OutputReference include Algebrick::TypeCheck include Algebrick::Matching require 'dynflow/action/format' extend Action::Format require 'dynflow/...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/execution_history.rb
lib/dynflow/execution_history.rb
# frozen_string_literal: true module Dynflow class ExecutionHistory include Algebrick::TypeCheck include Enumerable Event = Algebrick.type do fields! time: Integer, name: String, world_id: type { variants String, NilClass } end module Event def in...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/stateful.rb
lib/dynflow/stateful.rb
# frozen_string_literal: true module Dynflow module Stateful def self.included(base) base.extend ClassMethods end module ClassMethods def states raise NotImplementedError end def state_transitions raise NotImplementedError end end def states ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/testing.rb
lib/dynflow/testing.rb
# frozen_string_literal: true module Dynflow module Testing extend Algebrick::TypeCheck def self.logger_adapter @logger_adapter || LoggerAdapters::Simple.new('test.log', 1) end def self.logger_adapter=(adapter) Type! adapter, LoggerAdapters::Abstract @logger_adapter = adapter ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/watchers/memory_consumption_watcher.rb
lib/dynflow/watchers/memory_consumption_watcher.rb
# frozen_string_literal: true require 'get_process_mem' module Dynflow module Watchers class MemoryConsumptionWatcher attr_reader :memory_limit, :world def initialize(world, memory_limit, options) @memory_limit = memory_limit @world = world @polling_interval = options[:polli...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/serializers/noop.rb
lib/dynflow/serializers/noop.rb
# frozen_string_literal: true module Dynflow module Serializers class Noop < Abstract def serialize(arg) arg end def deserialize(arg) arg end end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/serializers/abstract.rb
lib/dynflow/serializers/abstract.rb
# frozen_string_literal: true module Dynflow module Serializers # @abstract # Used to serialize and deserialize arguments for storage in a database. # Used by {DelayedPlan} to store arguments which should be passed into # the {Dynflow::Action}'s #plan method when the plan is executed. class Abstr...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel.rb
lib/dynflow/persistence_adapters/sequel.rb
# frozen_string_literal: true require 'sequel' require 'msgpack' require 'fileutils' require 'csv' # rubocop:disable Metrics/ClassLength module Dynflow module PersistenceAdapters Sequel.extension :migration Sequel.database_timezone = :utc class Sequel < Abstract include Algebrick::TypeCheck ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/abstract.rb
lib/dynflow/persistence_adapters/abstract.rb
# frozen_string_literal: true module Dynflow module PersistenceAdapters class Abstract # The logger is set by the world when used inside it attr_accessor :logger def register_world(world) @logger ||= world.logger end def log(level, message) logger.send(level, messa...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/002_incremental_progress.rb
lib/dynflow/persistence_adapters/sequel_migrations/002_incremental_progress.rb
# frozen_string_literal: true Sequel.migration do change do alter_table(:dynflow_steps) do add_column :progress_done, Float add_column :progress_weight, Float end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/018_add_uuid_column.rb
lib/dynflow/persistence_adapters/sequel_migrations/018_add_uuid_column.rb
# frozen_string_literal: true helper = Module.new do def to_uuid(table_name, column_name) set_column_type(table_name, column_name, :uuid, :using => "#{column_name}::uuid") end def from_uuid(table_name, column_name) set_column_type table_name, column_name, String, primary_key: true, size: 36, fixed: true...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/msgpack_migration_helper.rb
lib/dynflow/persistence_adapters/sequel_migrations/msgpack_migration_helper.rb
# frozen_string_literal: true require 'json' require 'msgpack' class MsgpackMigrationHelper def initialize(tables) @tables = tables end def up(migration) @tables.each do |table, columns| new_columns = columns.map { |c| "#{c}_blob" } migrate_table migration, table, columns, new_columns, Fil...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/021_create_output_chunks.rb
lib/dynflow/persistence_adapters/sequel_migrations/021_create_output_chunks.rb
# frozen_string_literal: true Sequel.migration do up do type = database_type create_table(:dynflow_output_chunks) do primary_key :id column_properties = if type.to_s.include?('postgres') { type: :uuid } else { type...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/005_envelopes.rb
lib/dynflow/persistence_adapters/sequel_migrations/005_envelopes.rb
# frozen_string_literal: true Sequel.migration do change do create_table(:dynflow_envelopes) do primary_key :id # we don't add a foreign key to worlds here as there might be an envelope created for the world # while the world gets terminated, and it would mess the whole thing up: # error ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/012_add_delayed_plans_serialized_args.rb
lib/dynflow/persistence_adapters/sequel_migrations/012_add_delayed_plans_serialized_args.rb
# frozen_string_literal: true Sequel.migration do change do alter_table(:dynflow_delayed_plans) do long_text_type = @db.database_type == :mysql ? :mediumtext : String add_column :serialized_args, long_text_type end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/009_fix_mysql_data_length.rb
lib/dynflow/persistence_adapters/sequel_migrations/009_fix_mysql_data_length.rb
# frozen_string_literal: true Sequel.migration do affected_tables = [:dynflow_actions, :dynflow_coordinator_records, :dynflow_delayed_plans, :dynflow_envelopes, :dynflow_execution_plans] up do affected_tables.each do |table| alter_table(table) do if @db.database_type == :mysq...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/022_store_flows_as_msgpack.rb
lib/dynflow/persistence_adapters/sequel_migrations/022_store_flows_as_msgpack.rb
# frozen_string_literal: true require_relative 'msgpack_migration_helper' Sequel.migration do helper = MsgpackMigrationHelper.new({ :dynflow_actions => [:data, :input, :output], :dynflow_coordinator_records => [:data], :dynflow_delayed_plans => [:serialized_args, :data], :dynflow_envelopes => [:data...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/003_parent_action.rb
lib/dynflow/persistence_adapters/sequel_migrations/003_parent_action.rb
# frozen_string_literal: true Sequel.migration do change do alter_table(:dynflow_actions) do add_column :caller_execution_plan_id, String, fixed: true, size: 36 add_column :caller_action_id, Integer add_index [:caller_execution_plan_id, :caller_action_id] end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
lib/dynflow/persistence_adapters/sequel_migrations/023_sqlite_workarounds.rb
# frozen_string_literal: true tables = [:dynflow_actions, :dynflow_delayed_plans, :dynflow_steps, :dynflow_output_chunks] Sequel.migration do up do if database_type == :sqlite && Gem::Version.new(SQLite3::SQLITE_VERSION) <= Gem::Version.new('3.7.17') tables.each do |table| alter_table(table) { drop...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/016_add_step_queue.rb
lib/dynflow/persistence_adapters/sequel_migrations/016_add_step_queue.rb
# frozen_string_literal: true Sequel.migration do change do alter_table(:dynflow_steps) do add_column :queue, String end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/004_coordinator_records.rb
lib/dynflow/persistence_adapters/sequel_migrations/004_coordinator_records.rb
# frozen_string_literal: true Sequel.migration do change do create_table(:dynflow_coordinator_records) do column :id, String, size: 100 column :class, String, size: 100 primary_key [:id, :class] index :class column :owner_id, String index :owner_id column :data, String, ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/020_drop_duplicate_indices.rb
lib/dynflow/persistence_adapters/sequel_migrations/020_drop_duplicate_indices.rb
# frozen_string_literal: true Sequel.migration do up do alter_table(:dynflow_actions) do drop_index [:execution_plan_uuid, :id] end alter_table(:dynflow_execution_plans) do drop_index :uuid end alter_table(:dynflow_steps) do drop_index [:execution_plan_uuid, :id] end end...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/008_rename_scheduled_plans_to_delayed_plans.rb
lib/dynflow/persistence_adapters/sequel_migrations/008_rename_scheduled_plans_to_delayed_plans.rb
# frozen_string_literal: true Sequel.migration do change do rename_table(:dynflow_scheduled_plans, :dynflow_delayed_plans) end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/013_add_action_columns.rb
lib/dynflow/persistence_adapters/sequel_migrations/013_add_action_columns.rb
# frozen_string_literal: true Sequel.migration do change do alter_table(:dynflow_actions) do long_text_type = @db.database_type == :mysql ? :mediumtext : String add_column :class, String add_column :input, long_text_type add_column :output, long_text_type # These could be removed i...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/017_add_delayed_plan_frozen.rb
lib/dynflow/persistence_adapters/sequel_migrations/017_add_delayed_plan_frozen.rb
# frozen_string_literal: true Sequel.migration do change do alter_table(:dynflow_delayed_plans) do add_column :frozen, :boolean end self[:dynflow_delayed_plans].update(:frozen => false) end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/019_update_mysql_time_precision.rb
lib/dynflow/persistence_adapters/sequel_migrations/019_update_mysql_time_precision.rb
# frozen_string_literal: true Sequel.migration do up do alter_table(:dynflow_execution_plans) do if @db.database_type == :mysql set_column_type :started_at, 'datetime(3)' set_column_type :ended_at, 'datetime(3)' end end alter_table(:dynflow_steps) do if @db.database_typ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/011_placeholder.rb
lib/dynflow/persistence_adapters/sequel_migrations/011_placeholder.rb
# frozen_string_literal: true Sequel.migration do # Placeholder for 011_add_uuid_column.rb - it was readded in # 018_add_uuid_column.rb with fixed check for postgresql end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/015_add_execution_plan_columns.rb
lib/dynflow/persistence_adapters/sequel_migrations/015_add_execution_plan_columns.rb
# frozen_string_literal: true Sequel.migration do change do alter_table(:dynflow_execution_plans) do long_text_type = @db.database_type == :mysql ? :mediumtext : String add_column :class, String add_column :run_flow, long_text_type add_column :finalize_flow, long_text_type add_col...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/007_future_execution.rb
lib/dynflow/persistence_adapters/sequel_migrations/007_future_execution.rb
# frozen_string_literal: true Sequel.migration do change do create_table(:dynflow_scheduled_plans) do foreign_key :execution_plan_uuid, :dynflow_execution_plans, type: String, size: 36, fixed: true index :execution_plan_uuid column :start_at, Time index :start_at column :start_befor...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/006_fix_data_length.rb
lib/dynflow/persistence_adapters/sequel_migrations/006_fix_data_length.rb
# frozen_string_literal: true Sequel.migration do up do alter_table(:dynflow_steps) do if @db.database_type == :mysql set_column_type :data, :mediumtext end end end down do alter_table(:dynflow_steps) do if @db.database_type == :mysql set_column_type :data, :text ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/010_add_execution_plans_label.rb
lib/dynflow/persistence_adapters/sequel_migrations/010_add_execution_plans_label.rb
# frozen_string_literal: true Sequel.migration do change do alter_table(:dynflow_execution_plans) do add_column :label, String end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/014_add_step_columns.rb
lib/dynflow/persistence_adapters/sequel_migrations/014_add_step_columns.rb
# frozen_string_literal: true Sequel.migration do change do alter_table(:dynflow_steps) do add_column :class, String add_column :error, @db.database_type == :mysql ? :mediumtext : String # These could be removed in the future because an action can have at most one of each # and each be...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/001_initial.rb
lib/dynflow/persistence_adapters/sequel_migrations/001_initial.rb
# frozen_string_literal: true Sequel.migration do up do create_table(:dynflow_execution_plans) do column :uuid, String, primary_key: true, size: 36, fixed: true index :uuid, :unique => true column :data, String, text: true column :state, String column :result, String column ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/024_store_execution_plan_data_as_msgpack.rb
lib/dynflow/persistence_adapters/sequel_migrations/024_store_execution_plan_data_as_msgpack.rb
# frozen_string_literal: true require_relative 'msgpack_migration_helper' Sequel.migration do helper = MsgpackMigrationHelper.new({ :dynflow_execution_plans => [:data], :dynflow_steps => [:data] }) up do helper.up(self) end down do helper.down(self) end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/persistence_adapters/sequel_migrations/025_create_execution_plan_dependencies.rb
lib/dynflow/persistence_adapters/sequel_migrations/025_create_execution_plan_dependencies.rb
# frozen_string_literal: true Sequel.migration do up do type = database_type create_table(:dynflow_execution_plan_dependencies) do column_properties = if type.to_s.include?('postgres') { type: :uuid } else { type: String,...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/dispatcher/client_dispatcher.rb
lib/dynflow/dispatcher/client_dispatcher.rb
# frozen_string_literal: true module Dynflow module Dispatcher class ClientDispatcher < Abstract TrackedRequest = Algebrick.type do fields! id: String, request: Request, accepted: Concurrent::Promises::ResolvableFuture, finished: Concurrent::Promises::ResolvableFuture end ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/dispatcher/executor_dispatcher.rb
lib/dynflow/dispatcher/executor_dispatcher.rb
# frozen_string_literal: true module Dynflow module Dispatcher class ExecutorDispatcher < Abstract def initialize(world, semaphore) @world = Type! world, World @current_futures = Set.new end def handle_request(envelope) match(envelope.message, on(Pla...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/dispatcher/abstract.rb
lib/dynflow/dispatcher/abstract.rb
# frozen_string_literal: true module Dynflow module Dispatcher class Abstract < Actor def connector @world.connector end def respond(request_envelope, response) response_envelope = request_envelope.build_response_envelope(response, @world) connector.send(response_envelo...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/coordinator_adapters/sequel.rb
lib/dynflow/coordinator_adapters/sequel.rb
# frozen_string_literal: true module Dynflow module CoordinatorAdapters class Sequel < Abstract def initialize(world) super @sequel_adapter = world.persistence.adapter Type! @sequel_adapter, PersistenceAdapters::Sequel end def create_record(record) @sequel_adapt...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/coordinator_adapters/abstract.rb
lib/dynflow/coordinator_adapters/abstract.rb
# frozen_string_literal: true module Dynflow module CoordinatorAdapters class Abstract include Algebrick::TypeCheck def initialize(world) Type! world, World @world = world end def create_record(record) raise NotImplementedError end def update_record(...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/middleware/world.rb
lib/dynflow/middleware/world.rb
# frozen_string_literal: true module Dynflow class Middleware::World include Algebrick::TypeCheck def initialize @register = Middleware::Register.new clear_cache! end def use(*args) clear_cache! @register.use(*args) end def execute(method, action_or_class, *args, &b...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/middleware/stack.rb
lib/dynflow/middleware/stack.rb
# frozen_string_literal: true module Dynflow class Middleware::Stack include Algebrick::TypeCheck attr_reader :action, :middleware_class, :middleware def self.build(middleware_classes, method, action, &block) middleware_classes.reverse_each.reduce(block) do |stack, klass| Middleware::Stac...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/middleware/resolver.rb
lib/dynflow/middleware/resolver.rb
# frozen_string_literal: true require 'tsort' module Dynflow class Middleware::Resolver include TSort include Algebrick::TypeCheck def initialize(register) @register = Type! register, Middleware::Register end def result @result ||= begin @deps = normalize_rules(@register.ru...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/middleware/register.rb
lib/dynflow/middleware/register.rb
# frozen_string_literal: true module Dynflow class Middleware::Register include Algebrick::TypeCheck attr_reader :rules def initialize @rules = Hash.new do |h, k| h[k] = { before: [], after: [], replace: [] } end end def use(middleware_c...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/middleware/common/transaction.rb
lib/dynflow/middleware/common/transaction.rb
# frozen_string_literal: true module Dynflow module Middleware::Common class Transaction < Middleware def plan_phase(execution_plan) rollback_on_error(execution_plan) end def finalize_phase(execution_plan) rollback_on_error(execution_plan) end private def ro...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/middleware/common/singleton.rb
lib/dynflow/middleware/common/singleton.rb
# frozen_string_literal: true module Dynflow module Middleware::Common class Singleton < Middleware # Each action tries to acquire its own lock before the action's #plan starts def plan(*args) action.singleton_lock! pass(*args) end # At the start of #run we try to acquire...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/flows/registry.rb
lib/dynflow/flows/registry.rb
# frozen_string_literal: true module Dynflow module Flows class Registry class IdentifierTaken < ArgumentError; end class UnknownIdentifier < ArgumentError; end class << self def register!(klass, identifier) if (found = serialization_map[identifier]) raise Identif...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/flows/sequence.rb
lib/dynflow/flows/sequence.rb
# frozen_string_literal: true module Dynflow module Flows class Sequence < AbstractComposed protected def add_to_sequence(satisfying_flows, dependent_flow) # the flows are already in sequence, we don't need to do anything extra self << dependent_flow end end Registry.r...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/flows/atom.rb
lib/dynflow/flows/atom.rb
# frozen_string_literal: true module Dynflow module Flows class Atom < Abstract attr_reader :step_id def encode step_id end def initialize(step_id) @step_id = Type! step_id, Integer end def size 1 end def all_step_ids [step_id] ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/flows/concurrence.rb
lib/dynflow/flows/concurrence.rb
# frozen_string_literal: true module Dynflow module Flows class Concurrence < AbstractComposed protected def add_to_sequence(satisfying_flows, dependent_flow) if satisfying_flows.empty? self.sub_flows << dependent_flow return end extracted_flow = extract_f...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/flows/abstract.rb
lib/dynflow/flows/abstract.rb
# frozen_string_literal: true module Dynflow module Flows class Abstract < Serializable include Algebrick::TypeCheck def initialize raise 'cannot instantiate Flows::Abstract' end def to_hash { :class => self.class.name } end def empty? self.size == 0...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/flows/abstract_composed.rb
lib/dynflow/flows/abstract_composed.rb
# frozen_string_literal: true module Dynflow module Flows class AbstractComposed < Abstract attr_reader :flows def initialize(flows) Type! flows, Array flows.all? { |f| Type! f, Abstract } @flows = flows end def encode [Registry.encode(self)] + flows.map(...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/rails/daemon.rb
lib/dynflow/rails/daemon.rb
# frozen_string_literal: true require 'fileutils' require 'get_process_mem' require 'dynflow/watchers/memory_consumption_watcher' require 'active_support/core_ext/numeric/bytes' module Dynflow class Rails class Daemon attr_reader :dynflow_memory_watcher_class, :daemons_class # make Daemon dependenc...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/rails/configuration.rb
lib/dynflow/rails/configuration.rb
# frozen_string_literal: true require 'rails' require 'active_record' module Dynflow class Rails class Configuration # the number of threads in the pool handling the execution attr_accessor :pool_size # the size of db connection pool, if not set, it's calculated # from the amount of wor...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/extensions/msgpack.rb
lib/dynflow/extensions/msgpack.rb
# frozen_string_literal: true require 'msgpack' module Dynflow module Extensions module MsgPack module Time def to_msgpack(out = ''.dup) ::MessagePack.pack(self, out) out end end ::Time.include ::Dynflow::Extensions::MsgPack::Time ::MessagePack::Defau...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/polling.rb
lib/dynflow/action/polling.rb
# frozen_string_literal: true require 'dynflow/action/timeouts' module Dynflow module Action::Polling def self.included(base) base.send :include, Action::Timeouts end Poll = Algebrick.atom def run(event = nil) case event when nil if external_task resume_external...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/with_sub_plans.rb
lib/dynflow/action/with_sub_plans.rb
# frozen_string_literal: true module Dynflow module Action::WithSubPlans include Dynflow::Action::Cancellable class SubtaskFailedException < RuntimeError def backtrace [] end end SubPlanFinished = Algebrick.type do fields! :execution_plan_id => String, :succe...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/with_bulk_sub_plans.rb
lib/dynflow/action/with_bulk_sub_plans.rb
# frozen_string_literal: true module Dynflow module Action::WithBulkSubPlans include Dynflow::Action::Cancellable DEFAULT_BATCH_SIZE = 100 # Should return a slice of size items starting from item with index from def batch(from, size) raise NotImplementedError end PlanNextBatch = Alge...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/format.rb
lib/dynflow/action/format.rb
# frozen_string_literal: true module Dynflow module Action::Format def input_format(&block) # Format definitions are not validated # This method is kept for backward compatibility but does nothing end def output_format(&block) # Format definitions are not validated # This method ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/missing.rb
lib/dynflow/action/missing.rb
# frozen_string_literal: true module Dynflow # for cases the serialized action was renamed and it's not available # in the code base anymore. class Action::Missing < Dynflow::Action def self.generate(action_name) Class.new(self).tap do |klass| klass.singleton_class.send(:define_method, :name) d...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/timeouts.rb
lib/dynflow/action/timeouts.rb
# frozen_string_literal: true module Dynflow module Action::Timeouts Timeout = Algebrick.atom def process_timeout fail("Timeout exceeded.") end def schedule_timeout(seconds, optional: false) plan_event(Timeout, seconds, optional: optional) end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/v2.rb
lib/dynflow/action/v2.rb
# frozen_string_literal: true module Dynflow class Action module V2 require 'dynflow/action/v2/with_sub_plans' end end end
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/with_polling_sub_plans.rb
lib/dynflow/action/with_polling_sub_plans.rb
# frozen_string_literal: true module Dynflow module Action::WithPollingSubPlans REFRESH_INTERVAL = 10 Poll = Algebrick.atom def run(event = nil) case event when Poll poll else super(event) end end def poll recalculate_counts try_to_finish || s...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/rescue.rb
lib/dynflow/action/rescue.rb
# frozen_string_literal: true module Dynflow module Action::Rescue Strategy = Algebrick.type do variants Skip = atom, Pause = atom, Fail = atom end SuggestedStrategy = Algebrick.type do fields! action: Action, strategy: Strategy end # What strategy should be used for...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/cancellable.rb
lib/dynflow/action/cancellable.rb
# frozen_string_literal: true module Dynflow module Action::Cancellable Cancel = Algebrick.atom Abort = Algebrick.atom def run(event = nil) case event when Cancel cancel! when Abort abort! else super event end end def cancel! raise No...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/singleton.rb
lib/dynflow/action/singleton.rb
# frozen_string_literal: true module Dynflow class Action module Singleton def self.included(base) base.middleware.use ::Dynflow::Middleware::Common::Singleton end def validate_singleton_lock! singleton_lock! unless holds_singleton_lock? end def singleton_lock! ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/progress.rb
lib/dynflow/action/progress.rb
# frozen_string_literal: true module Dynflow # Methods for specifying the progress of the action # the +*_progress+ methods should return number in 0..1. # The weight is there to increase/decrease the portion of this task # in the context of other tasks in execution plan. Normal action has # weight 1. # ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/suspended.rb
lib/dynflow/action/suspended.rb
# frozen_string_literal: true module Dynflow class Action::Suspended attr_reader :execution_plan_id, :step_id def initialize(action) @world = action.world @execution_plan_id = action.execution_plan_id @step_id = action.run_step_id end def plan_event(event, ti...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/action/v2/with_sub_plans.rb
lib/dynflow/action/v2/with_sub_plans.rb
# frozen_string_literal: true module Dynflow::Action::V2 module WithSubPlans include Dynflow::Action::Cancellable DEFAULT_BATCH_SIZE = 100 DEFAULT_POLLING_INTERVAL = 15 Ping = Algebrick.atom class SubtaskFailedException < RuntimeError def backtrace [] end end # Meth...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/parallel.rb
lib/dynflow/executors/parallel.rb
# frozen_string_literal: true module Dynflow module Executors class Parallel require 'dynflow/executors/abstract/core' require 'dynflow/executors/parallel/core' # only load Sidekiq pieces when run in Sidekiq runtime (and the Sidekiq module is already loaded) require 'dynflow/executors/sid...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/abstract/core.rb
lib/dynflow/executors/abstract/core.rb
# frozen_string_literal: true module Dynflow module Executors module Abstract class Core < Actor attr_reader :logger def initialize(world, heartbeat_interval, queues_options) @logger = world.logger @world = Type! world, World @pools =...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/parallel/core.rb
lib/dynflow/executors/parallel/core.rb
# frozen_string_literal: true require 'dynflow/executors/parallel/pool' require 'dynflow/executors/parallel/worker' module Dynflow module Executors class Parallel class Core < Abstract::Core attr_reader :logger def initialize(world, heartbeat_interval, queues_options) super ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/parallel/pool.rb
lib/dynflow/executors/parallel/pool.rb
# frozen_string_literal: true module Dynflow module Executors class Parallel class Pool < Actor class JobStorage def initialize @jobs = [] end def add(work) @jobs << work end def pop @jobs.shift end ...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/parallel/worker.rb
lib/dynflow/executors/parallel/worker.rb
# frozen_string_literal: true module Dynflow module Executors class Parallel class Worker < Actor def initialize(pool, transaction_adapter, telemetry_options = {}) @pool = Type! pool, Concurrent::Actor::Reference @transaction_adapter = Type! transaction_adapter, T...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/sidekiq/core.rb
lib/dynflow/executors/sidekiq/core.rb
# frozen_string_literal: true require 'dynflow/executors/sidekiq/serialization' require 'dynflow/executors/sidekiq/internal_job_base' require 'dynflow/executors/sidekiq/orchestrator_jobs' require 'dynflow/executors/sidekiq/worker_jobs' require 'dynflow/executors/sidekiq/redis_locking' require 'sidekiq-reliable-fetch'...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/sidekiq/serialization.rb
lib/dynflow/executors/sidekiq/serialization.rb
# frozen_string_literal: true module Dynflow module Executors module Sidekiq # Module to prepend the Sidekiq job to handle the serialization module Serialization def self.serialize(value) Dynflow.serializer.dump(value) end def self.deserialize(value) value...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/sidekiq/worker_jobs.rb
lib/dynflow/executors/sidekiq/worker_jobs.rb
# frozen_string_literal: true module Dynflow module Executors module Sidekiq module WorkerJobs class PerformWork < InternalJobBase def perform(work_item) with_telemetry(work_item) do Executors.run_user_code do work_item.world = Dynflow.process_wor...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/sidekiq/redis_locking.rb
lib/dynflow/executors/sidekiq/redis_locking.rb
# frozen_string_literal: true module Dynflow module Executors module Sidekiq module RedisLocking REDIS_LOCK_KEY = 'dynflow_orchestrator_uuid' REDIS_LOCK_TTL = 60 REDIS_LOCK_POLL_INTERVAL = 15 ACQUIRE_OK = 0 ACQUIRE_MISSING = 1 ACQUIRE_TAKEN = 2 RELE...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false
Dynflow/dynflow
https://github.com/Dynflow/dynflow/blob/e14dcdfe57cec99cc78b2f6ab521f00809b1408a/lib/dynflow/executors/sidekiq/orchestrator_jobs.rb
lib/dynflow/executors/sidekiq/orchestrator_jobs.rb
# frozen_string_literal: true module Dynflow module Executors module Sidekiq module OrchestratorJobs # handles resposnes about finished work form the workers # or some event to handle on orchestrator side class WorkerDone < InternalJobBase sidekiq_options queue: :dynflow_o...
ruby
MIT
e14dcdfe57cec99cc78b2f6ab521f00809b1408a
2026-01-04T17:50:16.326730Z
false