1
0
Fork 0

remove unneeded event.Status field updates

This commit is contained in:
Aaron Lindsay 2013-08-13 23:13:54 -04:00
parent f3b4294b23
commit d5c199c021
1 changed files with 0 additions and 5 deletions

View File

@ -112,7 +112,6 @@ func ProcessLocalEvent(globals AsinkGlobals, event *asink.Event) {
if err != nil && !util.ErrorFileNotFound(err) { if err != nil && !util.ErrorFileNotFound(err) {
panic(err) panic(err)
} }
event.Status |= asink.COPIED_TO_TMP
//get the file's hash //get the file's hash
hash, err := HashFile(tmpfilename) hash, err := HashFile(tmpfilename)
@ -120,7 +119,6 @@ func ProcessLocalEvent(globals AsinkGlobals, event *asink.Event) {
if err != nil { if err != nil {
panic(err) panic(err)
} }
event.Status |= asink.HASHED
//If the file didn't actually change, squash this event //If the file didn't actually change, squash this event
if latestLocal != nil && event.Hash == latestLocal.Hash { if latestLocal != nil && event.Hash == latestLocal.Hash {
@ -137,14 +135,12 @@ func ProcessLocalEvent(globals AsinkGlobals, event *asink.Event) {
} }
panic(err) panic(err)
} }
event.Status |= asink.CACHED
//upload file to remote storage //upload file to remote storage
err = globals.storage.Put(event.Path, event.Hash) err = globals.storage.Put(event.Path, event.Hash)
if err != nil { if err != nil {
panic(err) panic(err)
} }
event.Status |= asink.UPLOADED
} }
//finally, send it off to the server //finally, send it off to the server
@ -153,7 +149,6 @@ func ProcessLocalEvent(globals AsinkGlobals, event *asink.Event) {
panic(err) //TODO handle sensibly panic(err) //TODO handle sensibly
} }
event.Status |= asink.ON_SERVER
} }
func ProcessRemoteEvent(globals AsinkGlobals, event *asink.Event) { func ProcessRemoteEvent(globals AsinkGlobals, event *asink.Event) {