Skip to content

Commit

Permalink
exit value must be always zero in the worker container
Browse files Browse the repository at this point in the history
otherwise it would re-run forever.

(issue fonttools#1241)
  • Loading branch information
felipesanches committed Apr 5, 2017
1 parent d65a2ec commit 41f382a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,13 @@ def callback(ch, method, properties, body): #pylint: disable=unused-argument
perform_job(fonts_dir, fonts_prefix)
ch.basic_ack(delivery_tag = method.delivery_tag)
connection.close()

runs -= 1
if runs == 0:
sys.exit(-1)
print("Finished work. Shutting down this container instance...")
sys.exit(0)
else:
print("Will fetch another workload...")


def main():
Expand Down

0 comments on commit 41f382a

Please sign in to comment.