This repository was archived by the owner on Mar 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ type JobResponseDBCreate struct {
3939 NodeName string `json:"node_name"`
4040}
4141
42- // JobResponseDBError holds the structure used when our job queue backend only needs to response with an error field (empty or not)
42+ // JobResponseDBError holds the structure used when our job queue backend only needs to respond with an error field (empty or not)
4343type JobResponseDBError struct {
4444 Err string `json:"error"`
4545}
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ func ConnectCache() (err error) {
8282}
8383
8484// DeleteCacheItem deletes the cached item with the given key if it exists
85- func DeleteCacheItem (cacheKey string ) ( error ) {
85+ func DeleteCacheItem (cacheKey string ) error {
8686 err := memCache .Delete (cacheKey )
8787
8888 // We don't care about cache misses
Original file line number Diff line number Diff line change @@ -222,7 +222,13 @@ func JobQueueCheck() {
222222 }
223223
224224 case "ping" :
225- // TODO: Write a ping responder so we can internally check if live nodes are responding
225+ // This just returns an empty response
226+ var response JobResponseDBError
227+ responsePayload , err = json .Marshal (response )
228+ if err != nil {
229+ log .Printf ("%s: error when serialising ping response json: %s" , config .Conf .Live .Nodename , err )
230+ responsePayload = []byte (fmt .Sprintf (`{"error": "%s"}` , err ))
231+ }
226232
227233 case "query" :
228234 if JobQueueDebug > 0 {
You can’t perform that action at this time.
0 commit comments