racherb / watcher Goto Github PK
View Code? Open in Web Editor NEWWatches the changes in the file system, variables and data records
License: MIT License
Watches the changes in the file system, variables and data records
License: MIT License
Describe the bug
close
func not work for alteration when the file not exist
To Reproduce
Steps to reproduce the behavior:
fw.alteration({'/tmp/fileA.tx'})
mon.info(wid)
ans: waiting
Expected behavior
A clear and concise description of what you expected to happen.
Describe the bug
util.lua:48: bad argument #1 to 'pairs' (table expected, got string)
Bug
Monit's nomatch always returns the additional number of elements that are search patterns.
To Reproduce
Steps to reproduce the behavior:
fw=require('watcher').file
fw.creation({'/etc/*', '/opt/watcher/obs/host/tmp/*'})
Take note of the value of the returned wid and wait for it to finish. The default MAXWAIT is 1 minute maximum wait time. Por example:1619642057921589
Determine the number of nomatch elements for the value noted above.
mon=require('watcher').monit
mon.match(1619642057921589)
tarantool> mon.nomatch(1619642057921589)
---
- - [1619642057921589, '/etc/*', 1619642057922038559, false, '_', 0]
- [1619642057921589, '/opt/watcher/obs/host/tmp/*', 1619642057922473550, false,
'_', 0]
...
Expected behavior
The watcher for search patterns, when it has worked, should exclude the patterns.
Describe the bug
File watcher fails when passing the file sort parameters for date 'MA' or 'MD' with the following error message:
main/119/file-watcher-bulk-d utils.c:1014 E> LuajitError: builtin/fio.lua:544: pathname is absent
To Reproduce
Steps to reproduce the behavior:
#!/usr/bin/env tarantool
local file_watcher=require('watcher').file
local fiber=require('fiber')
local function remove_file(file, waitfor)
fiber.sleep(waitfor)
os.remove(file)
end
os.execute('touch /tmp/f_G.txt')
os.execute('touch /tmp/f_H.txt')
os.execute('touch /tmp/f_I.txt')
os.execute('touch /tmp/f_J.txt')
os.execute('touch /tmp/f_K.txt')
os.execute('touch /tmp/f_L.txt')
local n_match = 2
fiber.create(remove_file, '/tmp/f_G.txt', 2)
fiber.create(remove_file, '/tmp/f_L.txt', 2)
fiber.create(remove_file, '/tmp/f_K.txt', 2)
local ini = os.time()
local SORT_BY = {
NO_SORT = 'NS',
ALPHA_ASC = 'AA',
ALPHA_DSC = 'AD',
MTIME_ASC = 'MA',
MTIME_DSC = 'MD'
}
local sort_by = SORT_BY.MTIME_ASC
--This fail for SORT_BY.MTIME_ASC and SORT_BY.MTIME_DSC
res = file_watcher.deletion({'/tmp/f_*'}, 5, 0.5, {'MA', 3, 2})
print('Elapsed time: ' .. os.difftime(os.time() - ini) .. 's')
print(res.wid)
print(res.ans)
os.exit()
Expected behavior
The system should work equally well for the different types of file sorting: NO_SORT = 'NS', ALPHA_ASC = 'AA', ALPHA_DSC = 'AD', MTIME_ASC = 'MA' and MTIME_DSC = 'MD'.
It seems, there is no .gitmodules
file in the repository.
How to reproduce:
$ git clone [email protected]:racherb/watcher.git
<...>
$ git submodule update --recursive --init
fatal: No url found for submodule path 'packpack' in .gitmodules
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.