rivian trusts the driver
- tags
- rivian
fswatch is a cross platform command that will let you watch a directory for changes. Lets give it a try:
|
|
And we can test it
|
|
And then in another terminal:
|
|
And see if the first one prints out anything!
Ok so that's simple. Lets see if we can put it in a Docker
container
and see if it works across volumes
|
|
Then build
|
|
Finally, start it up to test:
|
|
Events are a funny name here, because we can use it both to look at
the Created
and Updated
event, but also to filter out on file types
like IsFile
or IsDirectory
.
|
|
Lets have two scripts, one that writes files out into a directory when recording events, and another that loads them up as they come in and does something with them.
job_add
:
|
|
We can take a look at this and some various outputs:
|
|
|
|
or
|
|
|
|
Now we can implement job_watcher
. This first looks into the queue
directory for all of the job
files, and if it don't have a log
file
then calls process_job
. After that, it starts up fswatch
and runs
each file as it changes.
|
|
And lets see if we can communicate across the containers! With a new
Dockerfile.watcher
file:
|
|
Easy build with:
|
|
Then
|
|
Then if we add a couple of jobs
|
|
We'll get in return:
|
|
Previously
Next