It creates the lock for the message as well.
make_message(id, title, message, db, queue, lockdir)
Message id, integer, auto-generated.
Title of message.
The message itself.
Main DB file.
Name of the queue.
Directory to create the message lock in.
message object
The message object contains the connection to the message lock. If the worker crashes, then there will be no reference to the connection, and the lock will be released. This is how we detect crashed workers.