49 Commits

Author SHA1 Message Date
Athanasius
86cfed0ec5
Monitor: Add 'are you running this correctly?' check 2022-08-18 15:20:21 +01:00
Athanasius
b437df5af8
Move main scripts back into src/eddn/
So, yes, running any of these absolutely directly:

    cd src
    python eddn/Gateway.py

will fail.  But you *can*:

    cd src
    python -m eddn.Gateway

and they work perfectly fine.
2022-08-18 15:20:19 +01:00
Athanasius
c2dc30c8a2
Finally got the correct setup.py configuration for source of egg running
* py_modules parameter to setup() isn't documented in the setuptools
  docs, but is in a general 'python packaging' one.
* So now the main scripts are NOT within the `eddn` package..
* But all other code is...
* But the schema files don't need to be.

# Conflicts:
#	src/schemas/fssbodysignals-README.md
#	src/schemas/fssbodysignals-v1.0.json
#	src/schemas/fsssignaldiscovered-README.md
#	src/schemas/fsssignaldiscovered-v1.0.json
2022-08-18 15:20:18 +01:00
Athanasius
47ae96ddc1
More file re-arrangement, concentrating on running from source
With `import eddn.core.Validator` and the like it was actually picking
up the egg versions of the files, not local ones.

Currently this will run as per:

cd src/eddn
python Gateway.py --config ~/.local/share/eddn/dev/config.json

# Conflicts:
#	src/eddn/schemas/fssbodysignals-README.md
#	src/eddn/schemas/fssbodysignals-v1.0.json
#	src/eddn/schemas/fsssignaldiscovered-README.md
#	src/eddn/schemas/fsssignaldiscovered-v1.0.json
2022-08-18 15:20:18 +01:00
Athanasius
d36e45873d
Initial re-arrangement of files
* Move the service scripts out of src/eddn/ into src/
* Move the schemas/ to src/schemas/
* Some updates to setup.py, i.e. source of files, but the setuptools
  part isn't yet work.

# Conflicts:
#	src/schemas/fssbodysignals-README.md
#	src/schemas/fssbodysignals-v1.0.json
#	src/schemas/fsssignaldiscovered-README.md
#	src/schemas/fsssignaldiscovered-v1.0.json
2022-08-18 15:20:17 +01:00
Athanasius
1ae349a4b7
Make per-component logging more obvious 2022-08-18 15:20:15 +01:00
Athanasius
d79f4a5aa1
Monitor: Change to be able to run TLS-less
NB: Not yet changed the actual monitor web page files.
2022-08-18 15:20:15 +01:00
Athanasius
83fa055722
Monitor: Re-format with black 2022-08-18 15:19:54 +01:00
Athanasius
35fcbd89d9
Monitor: flake8 and mypy pass 2022-08-18 15:19:16 +01:00
Athanasius
c426885b52
Monitor: Tweak for zmq changes 2022-08-18 15:18:53 +01:00
Athanasius
5e51c604a4
flake8: minor cleanups
# Conflicts:
#	src/eddn/Gateway.py
2022-08-18 15:18:48 +01:00
Athanasius
529725d2db
Gateway -> Monitor now working
We literally weren't making use of the 'topic' in the message. Thus, so
as to avoid issues with trying to mash a string topic together with a
bytes (compressed) message, I've ripped that out.
2022-08-18 15:18:29 +01:00
Athanasius
cc19d390ce
Monitor: python3 tweaks
* setsockopt_string()
* Trying to see what's up with:

Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
  File "/home/eddn/dev/python3.9-venv/lib/python3.9/site-packages/eddn-2.0a0.dev0-py3.9.egg/eddn/Monitor.py", line 203, in monitor_worker
    message_text = zlib.decompress(message)
zlib.error: Error -3 while decompressing data: incorrect header check
2021-11-04T18:25:03Z <Greenlet at 0x7f71dbecf150: monitor_worker(b'\'https://eddn.edcd.io/schemas/journal/1\' |-| b)> failed with error
2022-08-18 15:18:29 +01:00
Athanasius
f7370a2f0b
Monitor: *Maybe* working now?
It doesn't crash, including when the gateway successfully receives a
message, but unclear if those messages are then making it to the Monitor
OK.
2022-08-18 15:18:29 +01:00
Athanasius
fdee2c054f
python3: Gateway now working
Now I'm actually trying to run the code I'm finding more that needs
changing in order to run under python3
2022-08-18 15:18:28 +01:00
Athanasius
ee7ac90996
DuplicateMessages: Refactor isDuplicated() name to snake_case 2022-08-18 15:18:27 +01:00
Athanasius
e9b4afcdf6
Use that bottle Plugin.apply() signature throughout
# Conflicts:
#	src/eddn/Gateway.py
2022-08-18 15:18:24 +01:00
Athanasius
fcfe9e01b2
Settings.loadConfig() got renamed to load_config() 2022-08-18 15:18:00 +01:00
Athanasius
06e9442bea
Monitor: Make EnableCors.apply() static 2022-08-18 15:17:59 +01:00
Athanasius
07e332ff61
Monitor: types pass 2022-08-18 15:17:59 +01:00
Athanasius
33a09ef8b5
Monitor: docstring'd 2022-08-18 15:17:59 +01:00
Athanasius
b37307e6a2
Monitor: Initial flake8 pass 2022-08-18 15:17:58 +01:00
Athanasius
86b283f920 Monitor.py: Minimal changes to allow --loglevel <level>
The CL arg won't actually *do* anything yet, because this script doesn't
actually have a logger set up at all.  But we need to fake this else
eddn.conf.Settings.loadConfig() won't be called correctly or work.
2022-01-18 15:09:56 +00:00
Athanasius
a8b3fc33e1 Monitor: Forgot the app.install(EnableCors()) 2021-07-02 16:57:06 +00:00
Athanasius
1feb7c2dee Monitor: Converted to app. including CORS handler 2021-07-02 16:54:37 +00:00
AnthorNet
e4bc72abe9 Remove GA 2020-07-06 14:24:09 +02:00
AnthorNet
1150a72b47 Remove uploader from monitor 2019-01-12 10:22:39 +01:00
AnthorNet
7b45a4ce78 Also comment in monitor 2018-12-14 12:08:05 +01:00
AnthorNet
f183391402 Update SQLLite query to MySQL 2018-10-23 11:44:11 +02:00
AnthorNet
5b74875630 Migrate SQLLite to MySQL 2018-10-23 09:58:21 +02:00
AnthorNet
ad1d133e66 Fix (Ignore): You must not use 8-bit bytestrings 2018-01-05 16:41:19 +01:00
AnthorNet
32ed86da91 Fix duplicate message not copied 2018-01-05 16:35:57 +01:00
AnthorNet
313120aa94 Implement tracking stats 2018-01-05 15:06:21 +01:00
Jonathan Harris
a959390ff7 Move SSL config to Settings 2017-07-03 12:31:20 +01:00
AnthorNet
5e841fb9c8 Switch monitor response to HTTPS 2017-06-29 12:04:03 +02:00
AnthorNet
81894ae0a7 Added ping to monitor 2016-01-18 15:04:57 +01:00
AnthorNet
ceaac2be74 Fix PEP8 2015-06-05 16:43:59 +02:00
AnthorNet
2f72fe84fe Moved _Core/_Conf to core/conf and some UTF8 fixes 2015-06-05 16:08:32 +02:00
AnthorNet
72f3f046d0 Removed spaces on empty lines 2015-06-05 15:23:46 +02:00
AnthorNet
58f47222f3 Added duplicate function 2015-05-08 17:55:25 +02:00
AnthorNet
bde962ade1 Fix monitor not removing topic from message 2015-05-07 19:33:45 +02:00
AnthorNet
d3f5fadc68 Little refactoring on monitor 2015-05-07 14:16:26 +02:00
AnthorNet
1bedc16f32 Added getTotalUploaders method to monitor 2015-05-07 13:15:34 +02:00
AnthorNet
71c77e9fdd Add getTotalSchemas to monitor 2015-05-07 12:52:56 +02:00
AnthorNet
cb9064fca2 Add softwares total method 2015-05-06 09:23:18 +02:00
AnthorNet
1101578d38 Add some methods to ask monitor 2015-05-05 15:58:20 +02:00
AnthorNet
e2bcca0c72 Added uploaderID monitor 2015-05-05 10:06:41 +02:00
AnthorNet
6a1800baf1 Added monitor setting and first monitoring 2015-05-05 09:47:41 +02:00
AnthorNet
c8e21abea5 Added monitor first draft 2015-05-04 13:29:10 +02:00