From 3.0.0 to 3.0.1

Summary

Optimization Server 3.0.1 introduces one break change in the Python worker bridge.

You are concerned by this guide if you develop your own Python worker .

Worker (Python).

Break changes: adjust code (see this page for more details)

At the end of the Python script, the new method execution_context.stop() must be called.

3.0.0:

   from optimserver.workerbridge import ExecutionContext
   
   if __name__ == '__main__':
       execution_context = ExecutionContext()
       execution_context.start()
       ...
       print('I am finished')

3.0.1:

   from optimserver.workerbridge import ExecutionContext
   
   if __name__ == '__main__':
       execution_context = ExecutionContext()
       execution_context.start()
       ...
       print('I am finished')
       execution_context.stop()