}
UserStatus := make(map[string]string)
- if *userStatusFifo != "" {
+ updateUserStatus := func() {
statuses, resp, err := c.GetUsersStatusesByIds(userIds)
if err != nil {
if DebugFd != nil {
if DebugFd != nil {
spew.Fdump(DebugFd, teams)
}
- userIds = nil
for _, s := range statuses {
UserStatus[Users[s.UserId].Username] = s.Status
}
- statuses = nil
+ }
+ if *userStatusFifo != "" {
+ updateUserStatus()
go func() {
for {
time.Sleep(mmc.SleepTime)
for {
select {
case <-t.C:
+ updateUserStatus()
if time.Now().Before(LastSent.Add(time.Minute)) {
continue
}
-e "s#CATFILE#$cmd/catfile#" \
-e "s#DLPANE#$cmd/dlpane#" < "$cmd"/tmux.conf > tmux.conf
$TMUX -f tmux.conf new-session -d -n ROOT -s mmc "cat debug | tai64n | tai64nlocal"
-$TMUX split-window -h 'while : ; do cat users/status | spc -e grn,"^O:.*" -e cya,"^A:.*" ; sleep 5 ; clear ; done'
+$TMUX split-window -h 'while : ; do cat users/status | spc -e grn,"^O:.*" -e cya,"^A:.*" ; sleep 30 ; clear ; done'
$TMUX split-window -v "$cmd/mmc/mmc -debug debug -user-status users/status -newwin $cmd/newwin -notify $cmd/notify | tai64n | tai64nlocal"
$TMUX attach-session