Unify the representation of the three dots.
This commit is contained in:

committed by
Sebastian Serth

parent
0f7e98f78e
commit
70c108aebf
@ -253,13 +253,13 @@ func shutdownOnOSSignal(server *http.Server, ctx context.Context, stopProfiling
|
|||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
case <-writeProfileSignal:
|
case <-writeProfileSignal:
|
||||||
log.Info("Received SIGUSR1 ...")
|
log.Info("Received SIGUSR1...")
|
||||||
|
|
||||||
stopProfiling()
|
stopProfiling()
|
||||||
// Continue listening on signals and replace `stopProfiling` with an empty function
|
// Continue listening on signals and replace `stopProfiling` with an empty function
|
||||||
shutdownOnOSSignal(server, ctx, func() {})
|
shutdownOnOSSignal(server, ctx, func() {})
|
||||||
case <-shutdownSignals:
|
case <-shutdownSignals:
|
||||||
log.Info("Received SIGINT, shutting down ...")
|
log.Info("Received SIGINT, shutting down...")
|
||||||
|
|
||||||
defer stopProfiling()
|
defer stopProfiling()
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), gracefulShutdownWait)
|
ctx, cancel := context.WithTimeout(context.Background(), gracefulShutdownWait)
|
||||||
|
@ -32,7 +32,7 @@ type codeOceanToRawReader struct {
|
|||||||
executorCtx context.Context
|
executorCtx context.Context
|
||||||
|
|
||||||
// A buffered channel of bytes is used to store data coming from CodeOcean via WebSocket
|
// A buffered channel of bytes is used to store data coming from CodeOcean via WebSocket
|
||||||
// and retrieve it when Read(..) is called. Since channels are thread-safe, we use one here
|
// and retrieve it when Read(...) is called. Since channels are thread-safe, we use one here
|
||||||
// instead of bytes.Buffer.
|
// instead of bytes.Buffer.
|
||||||
buffer chan byte
|
buffer chan byte
|
||||||
// The priorityBuffer is a buffer for injecting data into stdin of the execution from Poseidon,
|
// The priorityBuffer is a buffer for injecting data into stdin of the execution from Poseidon,
|
||||||
|
@ -59,7 +59,7 @@ type writingLoopMessage struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewCodeOceanOutputWriter provides an codeOceanOutputWriter for the time the context ctx is active.
|
// NewCodeOceanOutputWriter provides an codeOceanOutputWriter for the time the context ctx is active.
|
||||||
// The codeOceanOutputWriter handles all the messages defined in the websocket.schema.json (start, timeout, stdout, ..).
|
// The codeOceanOutputWriter handles all the messages defined in the websocket.schema.json (start, timeout, stdout, ...).
|
||||||
func NewCodeOceanOutputWriter(
|
func NewCodeOceanOutputWriter(
|
||||||
connection Connection, ctx context.Context, done context.CancelFunc) WebSocketWriter {
|
connection Connection, ctx context.Context, done context.CancelFunc) WebSocketWriter {
|
||||||
cw := &codeOceanOutputWriter{
|
cw := &codeOceanOutputWriter{
|
||||||
|
@ -214,7 +214,7 @@ func (m *NomadEnvironmentManager) load() error {
|
|||||||
for _, job := range templateJobs {
|
for _, job := range templateJobs {
|
||||||
jobLogger := log.WithField("jobID", *job.ID)
|
jobLogger := log.WithField("jobID", *job.ID)
|
||||||
if *job.Status != structs.JobStatusRunning {
|
if *job.Status != structs.JobStatusRunning {
|
||||||
jobLogger.Info("Job not running, skipping ...")
|
jobLogger.Info("Job not running, skipping...")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
configTaskGroup := nomad.FindAndValidateConfigTaskGroup(job)
|
configTaskGroup := nomad.FindAndValidateConfigTaskGroup(job)
|
||||||
|
@ -174,7 +174,7 @@ func (m *NomadRunnerManager) load() {
|
|||||||
usedRunners, err := m.loadEnvironment(environment)
|
usedRunners, err := m.loadEnvironment(environment)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithError(err).WithField(dto.KeyEnvironmentID, environment.ID().ToString()).
|
log.WithError(err).WithField(dto.KeyEnvironmentID, environment.ID().ToString()).
|
||||||
Warn("Failed loading environment. Skipping ...")
|
Warn("Failed loading environment. Skipping...")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for _, r := range usedRunners.List() {
|
for _, r := range usedRunners.List() {
|
||||||
@ -195,7 +195,7 @@ func (m *NomadRunnerManager) loadEnvironment(environment ExecutionEnvironment) (
|
|||||||
r, isUsed, err := m.loadSingleJob(job, environment)
|
r, isUsed, err := m.loadSingleJob(job, environment)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WithError(err).WithField(dto.KeyEnvironmentID, environment.ID().ToString()).
|
log.WithError(err).WithField(dto.KeyEnvironmentID, environment.ID().ToString()).
|
||||||
WithField("used", isUsed).Warn("Failed loading job. Skipping ...")
|
WithField("used", isUsed).Warn("Failed loading job. Skipping...")
|
||||||
continue
|
continue
|
||||||
} else if isUsed {
|
} else if isUsed {
|
||||||
used.Add(r.ID(), r)
|
used.Add(r.ID(), r)
|
||||||
|
@ -130,7 +130,7 @@ type UpdateFileSystemRequest struct {
|
|||||||
// FilePath specifies the path of a file and is part of the UpdateFileSystemRequest.
|
// FilePath specifies the path of a file and is part of the UpdateFileSystemRequest.
|
||||||
type FilePath string
|
type FilePath string
|
||||||
|
|
||||||
// EntryType specifies the type of the object (file/link/directory/..)
|
// EntryType specifies the type of the object (file/link/directory/...)
|
||||||
type EntryType string
|
type EntryType string
|
||||||
|
|
||||||
// These are the common entry types. You find others in the man pages `info ls`.
|
// These are the common entry types. You find others in the man pages `info ls`.
|
||||||
|
Reference in New Issue
Block a user