10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-12-22 04:13:31 +01:00

Longer timeout

This commit is contained in:
Anthony Scemama 2022-01-12 23:19:44 +01:00
parent bb64e47ac9
commit adce2efde7
2 changed files with 11 additions and 7 deletions

View File

@ -721,10 +721,14 @@ let run ?(daemon=true) ezfio_filename =
Unix.gettimeofday ()
in
let msg =
(*
List.rev_map String.trim raw_msg
|> List.rev
|> Message.create
and msg_size =
*)
Message.create raw_msg
in
let msg_size =
List.fold_left (fun accu x -> accu + (String.length x)) 0 raw_msg
in
let recv_log =
@ -787,12 +791,12 @@ let run ?(daemon=true) ezfio_filename =
let polling =
Zmq.Poll.poll ~timeout:1000 pollitem
in
match polling.(1) with
| Some Zmq.Poll.In -> handle_pull !status
match polling.(0) with
| Some Zmq.Poll.In -> handle_rep ()
| _ ->
begin
match polling.(0) with
| Some Zmq.Poll.In -> handle_rep ()
match polling.(1) with
| Some Zmq.Poll.In -> handle_pull !status
| _ ->
begin
flush !block_channel ;

View File

@ -90,14 +90,14 @@ subroutine zmq_unregister_worker(msg)
! Timeout 15 seconds
rc = -1
do i=1,15
do i=1,20
rc = f77_zmq_recv(zmq_to_dataserver_socket, buffer, 32, ZMQ_NOBLOCK)
if (rc == 2) then
call worker_log(irp_here, 'Unregistered')
return
endif
call worker_log(irp_here, 'Unregister failed. Retrying')
call sleep(1)
call sleep(5)
enddo
call abrt(irp_here, 'Unregister failed')