X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=lib%2Fagent%2Fagent.go;h=3aa89a862d7325505d87b1f679968b7cb0b4a059;hb=a2cc38902ff7528870822110c4f04329a3918564;hp=a562e77502e8ab622f8348df376487ec190a077f;hpb=57bdfc8349b3c8a727d6f439e1fd12661bc00a15;p=src%2Fxds%2Fxds-agent.git diff --git a/lib/agent/agent.go b/lib/agent/agent.go index a562e77..3aa89a8 100644 --- a/lib/agent/agent.go +++ b/lib/agent/agent.go @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017 "IoT.bzh" + * Copyright (C) 2017-2018 "IoT.bzh" * Author Sebastien Douheret * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,9 +27,10 @@ import ( "syscall" "time" + st "gerrit.automotivelinux.org/gerrit/src/xds/xds-agent/lib/syncthing" + + "gerrit.automotivelinux.org/gerrit/src/xds/xds-agent/lib/xdsconfig" "github.com/Sirupsen/logrus" - "github.com/iotbzh/xds-agent/lib/syncthing" - "github.com/iotbzh/xds-agent/lib/xdsconfig" "github.com/urfave/cli" ) @@ -132,6 +133,9 @@ func (ctx *Context) Run() (int, error) { ctx._logPrint("Logging file for HTTP requests: %s\n", logFileHTTPReq) } + // Create events management + ctx.events = NewEvents(ctx) + // Create syncthing instance when section "syncthing" is present in agent-config.json if ctx.Config.FileConf.SThgConf != nil { ctx.SThg = st.NewSyncThing(ctx.Config, ctx.Log) @@ -186,9 +190,6 @@ func (ctx *Context) Run() (int, error) { // Sessions manager ctx.sessions = NewClientSessions(ctx, cookieMaxAge) - // Create events management - ctx.events = NewEvents(ctx) - // Create projects management ctx.projects = NewProjects(ctx, ctx.SThg)