-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
This is my first time using persistent-queue. I've made a short test script to understand how it works. I put()
two items into the queue, then get()
both. I noticed that the q00000 file remains after the script exits. I also noticed that when I run the script again, it adds to the data already saved in the file.
from persistqueue import Queue
from vehicle import Vehicle
v = Vehicle()
q = Queue('/opt/speedcam/temp', autosave=True)
v.speed = 30
v.direction = 'east'
filename = 'file.dat'
q.put(v)
q.put(filename)
vehicle = q.get()
file = q.get()
print(vehicle.speed)
print(vehicle.direction)
print(filename)
Metadata
Metadata
Assignees
Labels
No labels