Commit 901d275f authored by Adoram-Kershner's avatar Adoram-Kershner
Browse files

Move waring to bin script

parent 29a6b0c8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -32,10 +32,9 @@ def pop_computetime_push(queue, inqueue, outqueue):
    # Check if the redis queue is empty
    msg = queue.rpop(inqueue)
    if msg is None:
        warnings.warn('Expected to process a cluster job, but the message queue is empty.')
        sys.exit()
        return msg

    # Load the message out of the processing queue and add a max processing time key
    # if msg is not empty, Load the message out of the processing queue and add a max processing time key
    msg = json.loads(msg, object_hook=object_hook)
    msg['max_time'] = time.time() + slurm_walltime_to_seconds(msg['walltime'])

+3 −0
Original line number Diff line number Diff line
@@ -47,5 +47,8 @@ if __name__ == '__main__':
    msg = pop_computetime_push(queue,
                               conf['processing_queue'],
                               conf['working_queue'])
    if msg is None:
        warnings.warn('Expected to process a cluster job, but the message queue is empty.')
        sys.exit()

    main(msg, config)