Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/3351-jobclass-round-trip.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- A background job whose `jobClass` cannot be resolved now throws `Wheels.JobClassNotFound` naming the class, the queue row, and the likely causes, instead of the engine's bare `component not found`. `wheels_jobs.jobClass` is written from `GetMetadata(this).name` on enqueue and resolved as a component path on drain, so the failure appears as "component not found" for a class that plainly exists on disk — which sends people to look at mappings and deployment rather than at the persisted string. Component paths are case-sensitive on Linux but not on macOS or Windows, so a casing mismatch resolves in development and fails on a production redeploy, long after the row was written. A path that resolves to something without a `perform()` method now throws `Wheels.InvalidJobClass` rather than failing later inside job execution. Both processing paths (`Job.$processJob` and `JobWorker.$executeJob`) share the check (#3351)
52 changes: 52 additions & 0 deletions public/testbox/system/stubs/139184C0543CCDB338AEFB643110CB89.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<cfscript>
variables[ "closeSSEStream" ] = variables[ "tmp_closeSSEStream_139184C0543CCDB338AEFB643110CB89" ];
this[ "closeSSEStream" ] = variables[ "tmp_closeSSEStream_139184C0543CCDB338AEFB643110CB89" ];

// Clean up
structDelete( variables, "tmp_closeSSEStream_139184C0543CCDB338AEFB643110CB89" );
structDelete( this, "tmp_closeSSEStream_139184C0543CCDB338AEFB643110CB89" );
public void function tmp_closeSSEStream_139184C0543CCDB338AEFB643110CB89(

) output=true {

var results = this._mockResults;
var resultsKey = "closeSSEStream";
var resultsCounter = 0;
var internalCounter = 0;
var resultsLen = 0;
var callbackLen = 0;
var argsHashKey = resultsKey & "|" & this.mockBox.normalizeArguments( arguments );
var fCallBack = "";

// If Method & argument Hash Results, switch the results struct
if (structKeyExists( this._mockArgResults, argsHashKey) ) {
// Check if it is a callback
if (isStruct( this._mockArgResults[ argsHashKey ]) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "type" ) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "target" ) ) {
fCallBack = this._mockArgResults[ argsHashKey ].target;
} else {
// switch context and key
results = this._mockArgResults;
resultsKey = argsHashKey;
}
}

// Get the statemachine counter
if (isSimpleValue( fCallBack) ) {
resultsLen = arrayLen( results[ resultsKey ] );
}

// Get the callback counter, if it exists
if (structKeyExists( this._mockCallbacks, resultsKey) ) {
callbackLen = arrayLen( this._mockCallbacks[ resultsKey ] );
}

// Log the Method Call
this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] = this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] + 1;

// Get the CallCounter Reference
internalCounter = this._mockMethodCallCounters[listFirst(resultsKey,"|")];
arrayAppend( this._mockCallLoggers["closeSSEStream"], arguments );
}
</cfscript>
52 changes: 52 additions & 0 deletions public/testbox/system/stubs/16CA394252B074478BEBD2B3A9C8EA82.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<cfscript>
variables[ "sendSSEComment" ] = variables[ "tmp_sendSSEComment_16CA394252B074478BEBD2B3A9C8EA82" ];
this[ "sendSSEComment" ] = variables[ "tmp_sendSSEComment_16CA394252B074478BEBD2B3A9C8EA82" ];

// Clean up
structDelete( variables, "tmp_sendSSEComment_16CA394252B074478BEBD2B3A9C8EA82" );
structDelete( this, "tmp_sendSSEComment_16CA394252B074478BEBD2B3A9C8EA82" );
public void function tmp_sendSSEComment_16CA394252B074478BEBD2B3A9C8EA82(

) output=true {

var results = this._mockResults;
var resultsKey = "sendSSEComment";
var resultsCounter = 0;
var internalCounter = 0;
var resultsLen = 0;
var callbackLen = 0;
var argsHashKey = resultsKey & "|" & this.mockBox.normalizeArguments( arguments );
var fCallBack = "";

// If Method & argument Hash Results, switch the results struct
if (structKeyExists( this._mockArgResults, argsHashKey) ) {
// Check if it is a callback
if (isStruct( this._mockArgResults[ argsHashKey ]) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "type" ) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "target" ) ) {
fCallBack = this._mockArgResults[ argsHashKey ].target;
} else {
// switch context and key
results = this._mockArgResults;
resultsKey = argsHashKey;
}
}

// Get the statemachine counter
if (isSimpleValue( fCallBack) ) {
resultsLen = arrayLen( results[ resultsKey ] );
}

// Get the callback counter, if it exists
if (structKeyExists( this._mockCallbacks, resultsKey) ) {
callbackLen = arrayLen( this._mockCallbacks[ resultsKey ] );
}

// Log the Method Call
this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] = this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] + 1;

// Get the CallCounter Reference
internalCounter = this._mockMethodCallCounters[listFirst(resultsKey,"|")];
arrayAppend( this._mockCallLoggers["sendSSEComment"], arguments );
}
</cfscript>
70 changes: 70 additions & 0 deletions public/testbox/system/stubs/30942F4D0BCB6139072EF27C66218715.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<cfscript>
variables[ "checkError" ] = variables[ "tmp_checkError_30942F4D0BCB6139072EF27C66218715" ];
this[ "checkError" ] = variables[ "tmp_checkError_30942F4D0BCB6139072EF27C66218715" ];

// Clean up
structDelete( variables, "tmp_checkError_30942F4D0BCB6139072EF27C66218715" );
structDelete( this, "tmp_checkError_30942F4D0BCB6139072EF27C66218715" );
public any function tmp_checkError_30942F4D0BCB6139072EF27C66218715(

) output=true {

var results = this._mockResults;
var resultsKey = "checkError";
var resultsCounter = 0;
var internalCounter = 0;
var resultsLen = 0;
var callbackLen = 0;
var argsHashKey = resultsKey & "|" & this.mockBox.normalizeArguments( arguments );
var fCallBack = "";

// If Method & argument Hash Results, switch the results struct
if (structKeyExists( this._mockArgResults, argsHashKey) ) {
// Check if it is a callback
if (isStruct( this._mockArgResults[ argsHashKey ]) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "type" ) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "target" ) ) {
fCallBack = this._mockArgResults[ argsHashKey ].target;
} else {
// switch context and key
results = this._mockArgResults;
resultsKey = argsHashKey;
}
}

// Get the statemachine counter
if (isSimpleValue( fCallBack) ) {
resultsLen = arrayLen( results[ resultsKey ] );
}

// Get the callback counter, if it exists
if (structKeyExists( this._mockCallbacks, resultsKey) ) {
callbackLen = arrayLen( this._mockCallbacks[ resultsKey ] );
}

// Log the Method Call
this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] = this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] + 1;

// Get the CallCounter Reference
internalCounter = this._mockMethodCallCounters[listFirst(resultsKey,"|")];
arrayAppend( this._mockCallLoggers["checkError"], arguments );

if (resultsLen neq 0) {
if (internalCounter gt resultsLen) {
resultsCounter = internalCounter - ( resultsLen * fix( ( internalCounter - 1 ) / resultsLen ) );
return results[ resultsKey ][ resultsCounter ];
} else {
return results[ resultsKey ][ internalCounter ];
}
}

if ( callbackLen neq 0 ) {
fCallBack = this._mockCallbacks[ resultsKey ].first();
return fCallBack( argumentCollection : arguments );
}

if ( not isSimpleValue( fCallBack ) ){
return fCallBack( argumentCollection : arguments );
}
}
</cfscript>
52 changes: 52 additions & 0 deletions public/testbox/system/stubs/754BEF48E30B63BC11E518FA73C07785.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<cfscript>
variables[ "sendSSEEvent" ] = variables[ "tmp_sendSSEEvent_754BEF48E30B63BC11E518FA73C07785" ];
this[ "sendSSEEvent" ] = variables[ "tmp_sendSSEEvent_754BEF48E30B63BC11E518FA73C07785" ];

// Clean up
structDelete( variables, "tmp_sendSSEEvent_754BEF48E30B63BC11E518FA73C07785" );
structDelete( this, "tmp_sendSSEEvent_754BEF48E30B63BC11E518FA73C07785" );
public void function tmp_sendSSEEvent_754BEF48E30B63BC11E518FA73C07785(

) output=true {

var results = this._mockResults;
var resultsKey = "sendSSEEvent";
var resultsCounter = 0;
var internalCounter = 0;
var resultsLen = 0;
var callbackLen = 0;
var argsHashKey = resultsKey & "|" & this.mockBox.normalizeArguments( arguments );
var fCallBack = "";

// If Method & argument Hash Results, switch the results struct
if (structKeyExists( this._mockArgResults, argsHashKey) ) {
// Check if it is a callback
if (isStruct( this._mockArgResults[ argsHashKey ]) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "type" ) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "target" ) ) {
fCallBack = this._mockArgResults[ argsHashKey ].target;
} else {
// switch context and key
results = this._mockArgResults;
resultsKey = argsHashKey;
}
}

// Get the statemachine counter
if (isSimpleValue( fCallBack) ) {
resultsLen = arrayLen( results[ resultsKey ] );
}

// Get the callback counter, if it exists
if (structKeyExists( this._mockCallbacks, resultsKey) ) {
callbackLen = arrayLen( this._mockCallbacks[ resultsKey ] );
}

// Log the Method Call
this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] = this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] + 1;

// Get the CallCounter Reference
internalCounter = this._mockMethodCallCounters[listFirst(resultsKey,"|")];
arrayAppend( this._mockCallLoggers["sendSSEEvent"], arguments );
}
</cfscript>
70 changes: 70 additions & 0 deletions public/testbox/system/stubs/B7681C49C5125395612F24D97559A4C2.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<cfscript>
variables[ "initSSEStream" ] = variables[ "tmp_initSSEStream_B7681C49C5125395612F24D97559A4C2" ];
this[ "initSSEStream" ] = variables[ "tmp_initSSEStream_B7681C49C5125395612F24D97559A4C2" ];

// Clean up
structDelete( variables, "tmp_initSSEStream_B7681C49C5125395612F24D97559A4C2" );
structDelete( this, "tmp_initSSEStream_B7681C49C5125395612F24D97559A4C2" );
public any function tmp_initSSEStream_B7681C49C5125395612F24D97559A4C2(

) output=true {

var results = this._mockResults;
var resultsKey = "initSSEStream";
var resultsCounter = 0;
var internalCounter = 0;
var resultsLen = 0;
var callbackLen = 0;
var argsHashKey = resultsKey & "|" & this.mockBox.normalizeArguments( arguments );
var fCallBack = "";

// If Method & argument Hash Results, switch the results struct
if (structKeyExists( this._mockArgResults, argsHashKey) ) {
// Check if it is a callback
if (isStruct( this._mockArgResults[ argsHashKey ]) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "type" ) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "target" ) ) {
fCallBack = this._mockArgResults[ argsHashKey ].target;
} else {
// switch context and key
results = this._mockArgResults;
resultsKey = argsHashKey;
}
}

// Get the statemachine counter
if (isSimpleValue( fCallBack) ) {
resultsLen = arrayLen( results[ resultsKey ] );
}

// Get the callback counter, if it exists
if (structKeyExists( this._mockCallbacks, resultsKey) ) {
callbackLen = arrayLen( this._mockCallbacks[ resultsKey ] );
}

// Log the Method Call
this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] = this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] + 1;

// Get the CallCounter Reference
internalCounter = this._mockMethodCallCounters[listFirst(resultsKey,"|")];
arrayAppend( this._mockCallLoggers["initSSEStream"], arguments );

if (resultsLen neq 0) {
if (internalCounter gt resultsLen) {
resultsCounter = internalCounter - ( resultsLen * fix( ( internalCounter - 1 ) / resultsLen ) );
return results[ resultsKey ][ resultsCounter ];
} else {
return results[ resultsKey ][ internalCounter ];
}
}

if ( callbackLen neq 0 ) {
fCallBack = this._mockCallbacks[ resultsKey ].first();
return fCallBack( argumentCollection : arguments );
}

if ( not isSimpleValue( fCallBack ) ){
return fCallBack( argumentCollection : arguments );
}
}
</cfscript>
70 changes: 70 additions & 0 deletions public/testbox/system/stubs/C383511C024245809F1F73E0CA52E220.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<cfscript>
variables[ "poll" ] = variables[ "tmp_poll_C383511C024245809F1F73E0CA52E220" ];
this[ "poll" ] = variables[ "tmp_poll_C383511C024245809F1F73E0CA52E220" ];

// Clean up
structDelete( variables, "tmp_poll_C383511C024245809F1F73E0CA52E220" );
structDelete( this, "tmp_poll_C383511C024245809F1F73E0CA52E220" );
public any function tmp_poll_C383511C024245809F1F73E0CA52E220(

) output=true {

var results = this._mockResults;
var resultsKey = "poll";
var resultsCounter = 0;
var internalCounter = 0;
var resultsLen = 0;
var callbackLen = 0;
var argsHashKey = resultsKey & "|" & this.mockBox.normalizeArguments( arguments );
var fCallBack = "";

// If Method & argument Hash Results, switch the results struct
if (structKeyExists( this._mockArgResults, argsHashKey) ) {
// Check if it is a callback
if (isStruct( this._mockArgResults[ argsHashKey ]) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "type" ) &&
structKeyExists( this._mockArgResults[ argsHashKey ], "target" ) ) {
fCallBack = this._mockArgResults[ argsHashKey ].target;
} else {
// switch context and key
results = this._mockArgResults;
resultsKey = argsHashKey;
}
}

// Get the statemachine counter
if (isSimpleValue( fCallBack) ) {
resultsLen = arrayLen( results[ resultsKey ] );
}

// Get the callback counter, if it exists
if (structKeyExists( this._mockCallbacks, resultsKey) ) {
callbackLen = arrayLen( this._mockCallbacks[ resultsKey ] );
}

// Log the Method Call
this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] = this._mockMethodCallCounters[ listFirst( resultsKey, "|" ) ] + 1;

// Get the CallCounter Reference
internalCounter = this._mockMethodCallCounters[listFirst(resultsKey,"|")];
arrayAppend( this._mockCallLoggers["poll"], arguments );

if (resultsLen neq 0) {
if (internalCounter gt resultsLen) {
resultsCounter = internalCounter - ( resultsLen * fix( ( internalCounter - 1 ) / resultsLen ) );
return results[ resultsKey ][ resultsCounter ];
} else {
return results[ resultsKey ][ internalCounter ];
}
}

if ( callbackLen neq 0 ) {
fCallBack = this._mockCallbacks[ resultsKey ].first();
return fCallBack( argumentCollection : arguments );
}

if ( not isSimpleValue( fCallBack ) ){
return fCallBack( argumentCollection : arguments );
}
}
</cfscript>
Loading
Loading