<commit_before>namespace :load do
	task :defaults do
		set :systemd_unit, ->{ fetch :application }
		set :systemd_use_sudo, false
		set :systemd_roles, %w(app)
	end
end

namespace :systemd do
	%w(start stop restart enable disable).each do |command|
		desc "#{command.capitalize} service"
		task command do
			on roles fetch :systemd_roles do
				exec :systemctl, command, fetch(:systemd_unit)
			end
		end
	end

	desc "Show the status of service"
	task :status do
		on roles fetch :systemd_roles do
			exec :systemctl, :status, fetch(:systemd_unit)
		end
	end

	desc "Reload systemd manager configuration"
	task "daemon-reload" do
		on roles fetch :systemd_roles do
			exec :systemctl, "daemon-reload"
		end
	end

	def exec *args
		fetch(:systemd_use_sudo) ? sudo(*args) : execute(*args)
	end
end

after "deploy:published", "systemd:daemon-reload"
after "deploy:finished", "systemd:restart"<commit_msg>do not run anything by default<commit_after>namespace :load do
	task :defaults do
		set :systemd_unit, ->{ fetch :application }
		set :systemd_use_sudo, false
		set :systemd_roles, %w(app)
	end
end

namespace :systemd do
	%w(start stop restart enable disable).each do |command|
		desc "#{command.capitalize} service"
		task command do
			on roles fetch :systemd_roles do
				exec :systemctl, command, fetch(:systemd_unit)
			end
		end
	end

	desc "Show the status of service"
	task :status do
		on roles fetch :systemd_roles do
			exec :systemctl, :status, fetch(:systemd_unit)
		end
	end

	desc "Reload systemd manager configuration"
	task "daemon-reload" do
		on roles fetch :systemd_roles do
			exec :systemctl, "daemon-reload"
		end
	end

	def exec *args
		fetch(:systemd_use_sudo) ? sudo(*args) : execute(*args)
	end
end
{'fraction_non_alphanumeric': 0.09322524609148813, 'fraction_numerical': 0.0, 'mean_word_length': 4.366459627329193, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1059214', 'n_tokens_mistral': 651, 'n_tokens_neox': 590, 'n_words': 194}