You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.
In an earlier issue it was found it might be useful to ignore one of the six types of events, specifically DIR WRITE.
We could create additional APPSODY environment variables which allow our users to turn off any of the six actions for either FILES, DIRs or both
The six actions supported by the watcher include:
CREATE
WRITE
RENAME
MOVE
REMOVE
CHMOD
The text was updated successfully, but these errors were encountered:
kewegner
changed the title
Make ignoring of file watching event types configurable
Make ignoring of file watching event actions configurable
Sep 20, 2019
These comments assume that directory events would be re-enabled. If not there is no need for the directory piece of this work.
First it must be noted no one has asked for this feature as of yet.
To approach the problem the following would need to be done.
Declare either a single variable or multiple variables in the Dockerfile-stack on two axis:
e.g.
APPSODY_FILE_CONTROLLER_ACTIONS=chmod,write,create,remove,rename, move
APPSODY_DIRECTORY_CONTROLLER_ACTIONS=chmod,write,create,remove,rename, move
-- we may need NONE as an option, and if both are none we might not want to enable the watcher.
The default would be that all actions are allowed for both if no variables are present,
The controller would then need to read in these environment variables.
The watcher could have a map for directory actions allowed and a map for file actions allowed.
The pollEvents loop would need to basically check:
Is the current item a file or a directory.
what is the action being performed and is it allowed for this type (file/directory).
The filter might need to be different in the sense that the action would need to be known, whereas today only the regex or type (file/directory) would need to be known.
If directory events are not needed, or the events are deemed to be the same for file and directory we could also investigate using the filterOps method on the watcher.
// FilterOps filters which event op types should be returned
// when an event occurs.
func (w *Watcher) FilterOps(ops ...Op) {
In an earlier issue it was found it might be useful to ignore one of the six types of events, specifically DIR WRITE.
We could create additional APPSODY environment variables which allow our users to turn off any of the six actions for either FILES, DIRs or both
The six actions supported by the watcher include:
CREATE
WRITE
RENAME
MOVE
REMOVE
CHMOD
The text was updated successfully, but these errors were encountered: