Comments (1)
THE SOLUTION IM LOOKING FOR
reply, listen_for_request = server.reply()
try:
for payload in listen_for_request:
res = process_payload(payload)
reply(res)
except:
traceback.print_exc()
# recover[0] = True
print(".............. recovering from zmq error .........")
server.reconnect() # <-------------- THIS NEEDS TO BE INCLUDED IN THE ZEROLESS LIBRARY
# This should:
# 1. restart the server, avoid the "already exists on port error"
# 2. Handle the stuck client, by either:
# a. sending the stuck request a FAILED message, and let the client handle it
# b. recalling the function, simple recovery
# c. returning what the failed method already processed, advanced recovery (BETTER SOLUTION)
# Explanation: The ZMQ error happens at the end (on reply) which means that the server function
already ran and returned results. So right before sending via reply, that data should be temporarily saved,
and if the reply failed, it will be used after server recovery to be return immediately to the client.
print(".............. recovering done .........")
from python-zeroless.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-zeroless.