mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 16:41:56 +00:00
12 lines
382 B
Python
12 lines
382 B
Python
import xmlrpc.client
|
|
|
|
if __name__ == "__main__":
|
|
try:
|
|
with xmlrpc.client.ServerProxy("http://localhost:9005/RPC2") as server:
|
|
info = server.supervisor.getAllProcessInfo()
|
|
error_states = list(filter(lambda x: x["state"] != 20, info))
|
|
exit(len(error_states))
|
|
except Exception as e:
|
|
print(e.with_traceback())
|
|
exit(1)
|