Skip to content

Commit

Permalink
Apply review suggestions (#1387)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoTavares authored Jun 20, 2024
1 parent 9974f5d commit 2752ad5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,7 @@ public boolean dispatchHost(DispatchFrame frame, VirtualProc proc) {

public void dispatch(DispatchFrame frame, VirtualProc proc) {
/*
* The frame is reserved, the proc is created, now update the frame to
* the running state.
*
* Creates a proc to run on the specified frame. Throws a
* ResourceReservationFailureException if the proc cannot be created due
* to lack of resources.
* Start frame and create proc on the database.
*/
dispatchSupport.startFrameAndProc(proc, frame);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class BookingQueue implements QueueHealthCheck {
private final int queueCapacity;
private final int corePoolSize;
private final int maxPoolSize;
// Base value for calculating the job sleep time
// this is used to slow down the booking queue to avoid racing conditions
private static final int BASE_SLEEP_TIME_MILLIS = 300;

private static final Logger logger = LogManager.getLogger("HEALTH");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,10 @@ public List<VirtualProc> dispatchHost(DispatchHost host, FrameInterface frame) {

@Override
public void dispatch(DispatchFrame frame, VirtualProc proc) {
/*
* The frame is reserved, the proc is created, now update
* the frame to the running state.
*/
// Allocate frame on the database
dispatchSupport.startFrameAndProc(proc, frame);

/*
* Communicate with RQD to run the frame.
*/
// Communicate with RQD to run the frame.
if (!testMode) {
dispatchSupport.runFrame(proc,frame);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,9 @@ boolean stopFrame(FrameInterface frame, FrameState state,
int exitStatus, long maxrss);

/**
* Updates the frame to the Running state. This should
* be done after RQD has accepted the frame. Setting
* the frame's state to running will result in a
* new entry in the frame_history table for the
* running frame.
*
* Reserve the resources in the specified proc for the
* specified frame. If the proc does not exist, its
* inserted, otherwise its updated.
* Updates the frame to the Running state and Reserve the resources
* in the specified proc for the specified frame. If the proc does
* not exist, its inserted, otherwise its updated.
*
* When a proc is created, the subscription, host,
* job, layer, folder, and shot proc counts get updated.
Expand Down

0 comments on commit 2752ad5

Please sign in to comment.