filed

Job queue using FUSE

git clone git://mccd.space/filed

commit b4abb11cf431967c81b6633fb62587e8320c8a4e
parent 49679f3053d21233f5cb4a5e508c1761b7e9e080
Author: Marc Coquand <marc@coquand.email>
Date:   Tue, 16 Dec 2025 17:58:53 +0100

New id

Diffstat:
Mnewid.go | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/newid.go b/newid.go
@@ -14,9 +14,9 @@ import (
 
 var NewIdName = "new-id"
 
-// Helper function to get a 4 character ID that hasn'nt been used before
+// Helper function to get a unique 4 character ID
 func randomJobId(store *store.Store, characters int) []byte {
-	const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
+	const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-="
 	rand.New(rand.NewSource(time.Now().UnixNano()))
 	result := make([]byte, characters)
 	for i := range result {
@@ -52,7 +52,7 @@ func (f NewIdFile) Attr(ctx context.Context, a *fuse.Attr) error {
 		a.Uid = uint32(os.Getuid())
 	}
 	a.Inode = f.inode
-	a.Size = uint64(4)
+	a.Size = uint64(16)
 
 	return nil
 }
@@ -76,6 +76,6 @@ func (f *NewIdFile) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp 
 }
 
 func (f *NewIdFile) ReadAll(ctx context.Context) ([]byte, error) {
-	slog.Info("FUSE: Read file content")
+	slog.Debug("FUSE: Read file content")
 	return randomJobId(f.manager.store, 4), nil
 }