To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit e95ca983 authored by Reto Da Forno's avatar Reto Da Forno
Browse files

minor adjustment

parent 0b259241
......@@ -871,7 +871,7 @@ def stop_test(testid, cur, cn, obsdict_key, obsdict_id, abort=False):
cmd.append("--debug")
p = subprocess.Popen(cmd)
rs = p.wait()
if rs not in (flocklab.SUCCESS, errno.ENOPKG): # flocklab.SUCCESS (0) is successful stop, ENOPKG (65) means the service was not running.
if rs != flocklab.SUCCESS:
msg = "Could not stop fetcher for test ID %d. Fetcher returned error %d" % (testid, rs)
errors.append(msg)
logger.error(msg)
......
......@@ -837,7 +837,8 @@ def stop_fetcher():
cn.close()
except:
logger.warning("Could not connect to database.")
return errno.ENOPKG
return flocklab.FAILED
return flocklab.SUCCESS
return flocklab.SUCCESS
### END stop_fetcher
......@@ -1006,7 +1007,7 @@ def main(argv):
ret = flocklab.SUCCESS
if stop:
ret = stop_fetcher()
logger.info("FlockLab fetcher stopped.")
logger.info("FlockLab fetcher stopped (exit code %d)." % ret)
sys.exit(ret)
# Start the fetcher processes which download data from the observers:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment