zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

exsync.ex (546B)


      1 require Logger
      2 
      3 defmodule ExSync do
      4   def start(_, _) do
      5     case Mix.env() do
      6       :dev ->
      7         if ExSync.Config.src_monitor_enabled() do
      8           ExSync.SrcMonitor.start_link()
      9           Logger.debug("ExSync source monitor started.")
     10         end
     11 
     12         ExSync.BeamMonitor.start_link()
     13         Logger.debug("ExSync beam monitor started.")
     14 
     15       _ ->
     16         Logger.error("ExSync NOT started. Only `:dev` environment is supported.")
     17     end
     18 
     19     {:ok, self()}
     20   end
     21 
     22   def start() do
     23     Application.ensure_all_started(:exsync)
     24   end
     25 end