[minor] rename back meta action into extended action

This commit is contained in:
Julien Vehent 2014-02-12 23:49:04 -05:00
Родитель b1297e0389
Коммит 65ce08b6da
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -51,12 +51,12 @@ import (
// a MetaAction is a json object that extends an Action with
// additional parameters. It is used to track the completion
// of an action on agents.
type MetaAction struct {
Action Action
Status string
StartTime, FinishTime, LastUpdateTime time.Time
CommandIDs []uint64
CmdCompleted, CmdSucceeded, CmdCancelled, CmdFailed, CmdTimeOut int
type ExtendedAction struct {
}
// an Action is the json object that is created by an investigator

Просмотреть файл

@ -84,7 +84,7 @@ import (
// Fly moves an action file to the InFlight directory and
// write it to database
func flyAction(ctx Context, ea mig.MetaAction, origin string) (err error) {
func flyAction(ctx Context, ea mig.ExtendedAction, origin string) (err error) {
defer func() {
if e := recover(); e != nil {
err = fmt.Errorf("flyAction() -> %v", e)

Просмотреть файл

@ -292,7 +292,7 @@ func watchDirectories(watcher *fsnotify.Watcher, ctx Context) {
// the action from the directory, parse it, retrieve a list of targets from
// the backend database, and create individual command for each target.
func processNewAction(actionPath string, ctx Context) (err error) {
var ea mig.MetaAction
var ea mig.ExtendedAction
defer func() {
if e := recover(); e != nil {
err = fmt.Errorf("processNewAction() -> %v", e)
@ -584,7 +584,7 @@ func updateAction(cmdPath string, ctx Context) (err error) {
}
// use the action ID from the command file to get the action from the database
var eas []mig.MetaAction
var eas []mig.ExtendedAction
actionCursor := ctx.DB.Col.Action.Find(bson.M{"action.id": cmd.Action.ID}).Iter()
err = actionCursor.All(&eas)
if err != nil {