Run a sync before restarting spectrometer-api 99/53499/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 17 Mar 2017 19:39:05 +0000 (15:39 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 17 Mar 2017 19:39:34 +0000 (15:39 -0400)
Fixes issue with mirroring when a new repo is created in Gerrit.

Change-Id: I730df43d856e026ab1b002cd6a03cb6ea9666328
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jjb/spectrometer/spectrometer-jobs.yaml

index a5532fbe7641520d7068f2ddd543e57c7de00a0b..b1bf0c530c95993144f08b94f076691c17a8602a 100644 (file)
@@ -86,6 +86,7 @@
           echo "---> Restart spectrometer-api"
           pkill gunicorn
           sleep 5  # Sleep 5 seconds for cooldown
+          spectrometer server sync
           nohup gunicorn -b 0.0.0.0:5000 'spectrometer:run_app()' --timeout 600 -k gevent >> ~/gunicorn.out &
           sleep 120  # Sleep 2 minutes to allow Spectrometer to initialize