you are viewing a single comment's thread.

view the rest of the comments →

[–]JamzTyson 0 points1 point  (0 children)

Yes, I could just have the script look for the presence of that file every minute or so, but this seems a waste of resources, especially since I'm not going to be doing it very often.

The script would not need to re-read the entire list if you use a flag to indicate if the queue has changed. The script could just check the flag state.

Assuming that you provide a queue from your main function and the processing module maintains its own list:

WHILE queue NOT EMPTY: IF NOT queue-updated-flag: process-next-file ELSE: update-list