File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import (
1515)
1616
1717var ErrNothingCanBeDone = errors .New ("nothing can be done" )
18+ var ErrConflictingMode = errors .New ("conflicting mode" )
1819
1920func Run () error {
2021 startupLogs ()
@@ -30,6 +31,14 @@ func Run() error {
3031 return ErrNothingCanBeDone
3132 }
3233
34+ // Validation: if ondemand and m3 are both enabled, abort here
35+ // Because it causes an issue with capture dir in ondemand.go
36+ if onDemandMode && m3Mode {
37+ logger .Error ().Msg ("OnDemand and M3 mode can not run together." )
38+
39+ return ErrConflictingMode
40+ }
41+
3342 // TODO: This is for backward compatibility: API mode can run along with on demand and M3.
3443 // Nobody of us knows whether there's any customer using this (on demand + API mode)
3544 // I think we should clean it up eventually.
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ func Run() {
4444
4545 err = runToCompletionOrSigterm (agent .Run )
4646 if err != nil {
47- logger .Log ( "Error: %s" , err . Error () )
47+ logger .Err ( err ). Msg ( "Error encountered" )
4848 }
4949
5050 logger .Log ("yc-360 script is shutting down..." )
You can’t perform that action at this time.
0 commit comments