class MiGA::Daemon

def initialize(project, json = nil)

~/.miga_daemon.json.
is used. In either case, missing variables are used as defined in
definition in json format. Otherwise, the project-stored daemon definition
to wake the daemon. If passed, +json+ must be the path to a daemon
Initialize an unactive daemon for the MiGA::Project +project+. See #daemon
#
def initialize(project, json = nil)
  @project = project
  @runopts = {}
  json ||= File.join(project.path, 'daemon/daemon.json')
  default_json = File.expand_path('.miga_daemon.json', ENV['MIGA_HOME'])
  MiGA::Json.parse(
    json, default: File.exist?(default_json) ? default_json : nil
  ).each { |k, v| runopts(k, v) }
  update_format_0
  @jobs_to_run = []
  @jobs_running = []
end