Skip to content

Commit

Permalink
fix job activation in assignKeeperToAllJobs
Browse files Browse the repository at this point in the history
  • Loading branch information
defi-dev committed Aug 2, 2024
1 parent 8c4d9ed commit 076391a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contracts/VRFAgentManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,16 @@ contract VRFAgentManager is Ownable {
}

function assignKeeperToAllJobs() external onlyOwner {
if (getAssignedKeeperToJob(vrfJobKey) == 0) {
if (!isJobActive(vrfJobKey)) {
if (getAssignedKeeperToJob(vrfJobKey) == 0 && !isJobActive(vrfJobKey)) {
agent.setJobConfig(vrfJobKey, true, false, true, true);
}
}
if (getAssignedKeeperToJob(vrfJobKey) == 0) {
_assignKeeperToJob(vrfJobKey);
}
if (getAssignedKeeperToJob(autoDepositJobKey) == 0) {
if (!isJobActive(autoDepositJobKey)) {
if (getAssignedKeeperToJob(autoDepositJobKey) == 0 && !isJobActive(autoDepositJobKey)) {
agent.setJobConfig(autoDepositJobKey, true, false, true, true);
}
}
if (getAssignedKeeperToJob(autoDepositJobKey) == 0) {
_assignKeeperToJob(autoDepositJobKey);
}
}
Expand Down

0 comments on commit 076391a

Please sign in to comment.