diff options
author | Corey Hulen <corey@hulen.com> | 2017-09-25 13:30:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-25 13:30:33 -0700 |
commit | 81c18a01bd22437457da04b6cdb8d409beb54446 (patch) | |
tree | 1c1a28dc72fe8685259870e53643de9f558dad79 /cmd | |
parent | 1bf2a2e8d5a552d23e16379e73c2d4aaefc9368f (diff) | |
download | chat-81c18a01bd22437457da04b6cdb8d409beb54446.tar.gz chat-81c18a01bd22437457da04b6cdb8d409beb54446.tar.bz2 chat-81c18a01bd22437457da04b6cdb8d409beb54446.zip |
PLT-7542 Converting LDAP sync to the job server (#7452)
* PLT-7542 Converting LDAP sync to the job server
* Fixing minor issues
* Fixing build failure
* Translate error message
* Translate error message
* Translate error message
* Translate error message
* Fixing merge
* Fixing bad merge
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/platform/ldap.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/platform/ldap.go b/cmd/platform/ldap.go index 16ad429bd..1bbcaa2f5 100644 --- a/cmd/platform/ldap.go +++ b/cmd/platform/ldap.go @@ -3,6 +3,7 @@ package main import ( + "github.com/mattermost/mattermost-server/model" "github.com/spf13/cobra" ) @@ -32,8 +33,9 @@ func ldapSyncCmdF(cmd *cobra.Command, args []string) error { } if ldapI := a.Ldap; ldapI != nil { - if err := ldapI.Syncronize(); err != nil { - CommandPrintErrorln("ERROR: AD/LDAP Synchronization Failed") + job, err := ldapI.StartSynchronizeJob(true) + if err != nil || job.Status == model.JOB_STATUS_ERROR || job.Status == model.JOB_STATUS_CANCELED { + CommandPrintErrorln("ERROR: AD/LDAP Synchronization please check the server logs") } else { CommandPrettyPrintln("SUCCESS: AD/LDAP Synchronization Complete") } |