def prep_apache_proxying
return unless MiqEnvironment::Command.supports_apache?
MiqApache::Control.kill_all
MiqUiWorker.install_apache_proxy_config
MiqWebServiceWorker.install_apache_proxy_config
end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export MRUBY_HOME=/opt/rubies/mruby-20150906 | |
| crystal run --link-flags -L${MRUBY_HOME}/lib/ hello.cr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "objspace" | |
| ObjectSpace.trace_object_allocations_start | |
| def log_object_space | |
| ObjectSpace.trace_object_allocations_stop | |
| object_hash = {} | |
| ObjectSpace.each_object do |o| | |
| key = "#{ObjectSpace.allocation_sourcefile(o)}" #:#{ObjectSpace.allocation_sourceline(o)}" | |
| object_hash[key] ||= Hash.new { |h, _| h[:count] = 0; h[:memsize] = 0 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Reason | |
| def reason_inverse_name(src, ref) | |
| # def inverse_name; delegate_reflection.send(:inverse_name); end | |
| ref = ref.respond_to?(:delegate_reflection) ? ref.delegate_reflection : ref | |
| if ref.options[:inverse_of] | |
| # will this false positive a :through? | |
| if ref.options[:inverse_of] == ref.send(:automatic_inverse_of) | |
| "UNNEEDED: `options[:inverse_of]`" | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| miq_schedule_worker_runner: | |
| Jobs.metric_purge_all_timer # role: database_operations | |
| VmdbMetric::Purging.purge_all_timer | |
| # model: VmdbDatabaseMetric, table: vmdb_database_metris | |
| VmdbMetric::Purging.purge_by_date(6.months.ago.utc, "hourly", 10_000) | |
| VmdbMetric::Purging.purge_by_date(6.months.ago.utc, "daily", 10_000) | |
| VmdbMetric::Purging.purge_all_timer | |
| # model: VmdbMetric, table: vmdb_metrics | |
| # PurgingMixin (need interval, so duplicated it) | |
| VmdbMetric::Purging.purge_by_date(6.months.ago.utc, "hourly", 10_000) |
| name | time | child | offset |
|---|
Executing action: explorer|22.1|29741.2|+19.0
VmInfraController#explorer|7.2|29719.1|+38.0
VmInfraController#x_build_dynatree|312.8|25769.1|+39.0
Rbac.search|136.9|141.8|+40.0
TreeBuilderVmsAndTemplates#tree|64.0|1565.8|+182.0
TreeBuilderVmsAndTemplates#tree|50.4|1423.2|+1748.0
EmsVmware#subtree_arranged|656.3|656.3|+1748.0
Rbac.search|301.0|666.4|+2418.0
| @ | ms | ms- | sql | sqlms | sqlrows | comments |
|---|---|---|---|---|---|---|
| 0.0 | 16,828.7 | 164 | 3,660.4 | 48075 | /vm_infra/explorer |
|
| 0.0 | 16,828.7 | 23.0 | GET http://localhost:3000/vm_infra/explorer |
|||
| 20.0 | 16,805.6 | 25.7 | 6 | 1.9 | 5 | .Executing action: explorer |
| 41.0 | 15,327.8 | 0.0 | ..VmShowMixin#feature_tree |
|||
| 41.0 | 15,327.8 | 0.2 | ...VmShowMixin#build_vm_feature_tree |
|||
| 41.0 | 3.3 | 3.3 | 3 | 0.3 | 3 | ....VmShowMixin#build_allowed_features |
| 44.0 | 15,310.6 | 2,265.7 | ....VmShowMixin#build_vm_tree |
|||
| 45.0 | 13,044.9 | 299.4 | 5 | 41.8 | 854 | .....ApplicationController::Explorer#x_build_dynatree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WITH RECURSIVE search_tree(id, path) AS ( | |
| SELECT id, ARRAY[id] | |
| FROM services | |
| WHERE id = 42 | |
| UNION ALL | |
| SELECT services.id, path || services.id | |
| FROM search_tree | |
| JOIN services ON services.service_id = search_tree.id | |
| WHERE NOT services.id = ANY(path) | |
| ) |
create table tst(val int);
insert into tst values(1),(2),(3),(4),(5),(6),(7),(8),(9),(10);select val from tst where (val=2) and (mod(val,2)=0) or (val >= 6);| val |
My comments on 7388
- s = MiqSearch.find(@sb[:planning][:options][:filter_value])
- s.options ||= {}
- s.options[:userid] = session[:userid]
- s.options[:results_format] = :objects
-vms, attrs = s.search
+ vms = MiqSearch.find(@sb[:planning][:options][:filter_value]).filtered(nil, :userid => current_user)