Skip to content

Commit

Permalink
Fix: Added default frequency ensuring is an int always.
Browse files Browse the repository at this point in the history
  • Loading branch information
nesitor authored and hoh committed Oct 19, 2023
1 parent 3b894d7 commit 44fd1db
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/aleph/vm/controllers/firecracker/snapshot_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,14 @@ async def start_for(self, execution: VmExecution, frequency: Optional[int] = Non
msg = "Snapshots are not implemented for programs."
raise NotImplementedError(msg)

if not frequency:
frequency = settings.SNAPSHOT_FREQUENCY
default_frequency = frequency or settings.SNAPSHOT_FREQUENCY

vm_hash = execution.vm_hash
snapshot_execution = SnapshotExecution(
scheduler=self._scheduler,
vm_hash=vm_hash,
execution=execution,
frequency=frequency,
frequency=default_frequency,
)
self.executions[vm_hash] = snapshot_execution
await snapshot_execution.start()
Expand Down

0 comments on commit 44fd1db

Please sign in to comment.