FTP API (server) to the lacmus project
lacmus-foundation / lacmus-web-api Goto Github PK
View Code? Open in Web Editor NEWAPI to the lacmus project
License: GNU General Public License v3.0
API to the lacmus project
License: GNU General Public License v3.0
We need some enhancements:
https://opendatascience.slack.com/archives/CE8869WEQ/p1594313091006700 - ods message in #ml_piepline
Using Postgres db (or MySql) and ef .core create compression microservice. Service shoud compree image, store it and return id to user. Add support for VOC format for image annotations and store it in json(xml) format.
Move code from https://github.com/lacmus-foundation/lacmus-web-storage or add as submodule
During production use was found users usually upload photos by batch, wait for result and then upload another. It would be useful to let then clean also processing results in found
and empty
folders of their project
Seems under unstable connection it could happen 2 messages IN_CLOSE_WRITE coming from inotify for the same file, which causes race conditions and crush of monitoring thread, so processing of files for this project stops
Also it would be nice, if ftp server after restart automatically picked up of files in the project dirs (currently files need to be reuploaded)
also would be reasonable to have some simple monitoring, checking files in project dirs and DB are beeing processed
2021-03-28 12:47:13,493 Events received in stream: ['IN_CLOSE_WRITE']
2021-03-28 12:47:13,493 File DJI_0681.JPG noticed by notify thread for project 7 in /etc/ftp_projects/project-7
2021-03-28 12:47:13,493 verifying file DJI_0681.JPG in /etc/ftp_projects/project-7
2021-03-28 12:47:13,494 tag: ImageDescription (270) - type: string (2) Tag Location: 22 - Data Location: 1012 - value: b'DCIM\\100MEDIA\\DJI_0681.JPG\x00'
2021-03-28 12:47:13,494 tag: Make (271) - type: string (2) Tag Location: 34 - Data Location: 1039 - value: b'DJI\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2021-03-28 12:47:13,494 tag: Model (272) - type: string (2) Tag Location: 46 - Data Location: 1069 - value: b'FC220\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
2021-03-28 12:47:13,503 uploading file DJI_0681.JPG in /etc/ftp_projects/project-7
2021-03-28 12:47:13,526 Starting new HTTP connection (1): localhost:9000
2021-03-28 12:47:13,528 http://localhost:9000 "GET /project7?location= HTTP/1.1" 200 128
2021-03-28 12:47:13,893 http://localhost:9000 "PUT /project7/DJI_0681.JPG HTTP/1.1" 200 0
2021-03-28 12:47:13,894 Collected user_id **** for file DJI_0681.JPG. Creating record in DB
2021-03-28 12:47:13,961 Removing /etc/ftp_projects/project-7/DJI_0681.JPG
....
2021-03-28 12:47:14,084 Events received in stream: ['IN_CLOSE_WRITE']
2021-03-28 12:47:14,085 File DJI_0681.JPG noticed by notify thread for project 7 in /etc/ftp_projects/project-7
2021-03-28 12:47:14,085 verifying file DJI_0681.JPG in /etc/ftp_projects/project-7
2021-03-28 12:47:14,085 Exception while verifying file DJI_0681.JPG in /etc/ftp_projects/project-7
Traceback (most recent call last):
File "./core/processing.py", line 18, in process_incoming_file
im = Image.open(os.path.join(path, file_name))
File "/usr/local/lib/python3.8/dist-packages/PIL/Image.py", line 2891, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/etc/ftp_projects/project-7/DJI_0681.JPG'
2021-03-28 12:47:14,103 moving file to error
2021-03-28 12:47:14,103 moving from /etc/ftp_projects/project-7/DJI_0681.JPG to /etc/ftp_projects/project-7/error/DJI_0681.JPG
2021-03-28 12:47:14,226 Cleaning-up inotify.
configure ml-worker it's api in a docker file
describe api of each service using openapi notation
remove C# ocelot
code and add krackend as api-gateway
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.