Skip to content
Merged
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
Prev Previous commit
Next Next commit
add check before casting
  • Loading branch information
bernardodemarco committed Jul 29, 2025
commit 1e8512b4164611608edb6f01f9871ce2c88ab497
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
import org.apache.cloudstack.backup.dao.BackupScheduleDao;
import org.apache.cloudstack.context.CallContext;
import org.apache.cloudstack.framework.config.ConfigKey;
import org.apache.cloudstack.framework.jobs.AsyncJob;
import org.apache.cloudstack.framework.jobs.AsyncJobDispatcher;
import org.apache.cloudstack.framework.jobs.AsyncJobManager;
import org.apache.cloudstack.framework.jobs.impl.AsyncJobVO;
Expand Down Expand Up @@ -673,6 +674,10 @@ protected void sendExceededBackupLimitAlert(String ownerUuid, Resource.ResourceT
* @return The backup schedule ID. Returns null if the backup has been manually created
*/
protected Long getBackupScheduleId(Object job) {
if (!(job instanceof AsyncJob)) {
return null;
}

AsyncJobVO asyncJob = (AsyncJobVO) job;
Comment thread
bernardodemarco marked this conversation as resolved.
logger.debug("Trying to retrieve [{}] parameter from the job [ID: {}] parameters.", ApiConstants.SCHEDULE_ID, asyncJob.getId());
String jobParamsRaw = asyncJob.getCmdInfo();
Expand Down
Loading