Skip to content

Queue file persists when all data "removed" #218

@ajkelsey

Description

@ajkelsey

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions