1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

181 Commits

Author SHA1 Message Date
Athanasius
a794d6088f
plugins/edsm: cmdr & entry declared & set early, so types now OK 2021-08-05 15:23:15 +01:00
Athanasius
ddc9286903
plugins/edsm: Queue *all* events to worker
We need to trigger off ShutDown and Commander/LoadGame to empty pending,
so need to *see* them in the worker.
2021-08-05 15:20:03 +01:00
Athanasius
53da204ffd
plugins/edsm: Empty pending on Shutdown & 2021-08-05 15:19:43 +01:00
Athanasius
26115a14f0
plugins/edsm: should_send() == True for any Shutdown event
We MUST attempt flushing pending events in case of commander change.
2021-08-05 15:01:33 +01:00
Athanasius
ba7c2de593
plugins/edsm: 'class This' the file & flake8/mypy cleanup 2021-08-05 14:40:41 +01:00
Athanasius
56d7ee64be
plugins/edsm: Add trace-on support & cleanup some mypy changes
* trace-on 'edsm-cmdr-events' for how Commanders, their API keys and
  using them are handled.  See #1134
* trace-on 'edsm-locations' for what was commented-out logging to do
  with ensuring code reacted correctly to any change of system.
* mypy/types-* seem to have had changes causing extra carping, so
  addressing that.
2021-08-05 14:06:42 +01:00
A_D
2e5e55af9a
Applied requested changes 2021-06-20 17:44:29 +02:00
A_D
fe0e752c9b
Added support for arbitrary plugins for POST debug
This works by replacing --eddn-local with --debug-sender, and making the
webserver more generic. support has been added to EDSM, EDDN, and INARA.
2021-06-18 23:36:42 +02:00
Athanasius
28ceb72a27 plugins/edsm: LANG comments added 2021-06-13 13:37:21 +01:00
Athanasius
4fa0521438 other core plugins: LANG comment pass 2021-06-07 15:43:32 +01:00
Athanasius
d5bb0cce5d EDSM: credentials() should just return None if no apikey 2021-06-04 10:21:56 +01:00
Athanasius
7bae9afe02 EDSM: Don't blindly assume we *already* have EDSM cmdr name and apikey 2021-06-04 10:16:52 +01:00
A_D
fe90f1f0b3
Cleaned up imports, removed incase imports
closes EDCD/EDMarketConnector#569
2021-05-28 14:46:51 +02:00
Athanasius
e5909e9024 EDSM: Use loaded BackPack data, not the empty event. 2021-05-20 18:26:51 +01:00
Athanasius
389a781de3 translations: Also edsm killswitch phrase 2021-05-17 10:21:39 +01:00
Athanasius
7f45953012 plugins/station: *Do* set station from BodyType/Body always
The 'if not this.station' was early paranoia when first getting things
working with Odyssey.  It prevents a relog from Horizons (i.e. different
location) from correctly picking up an Odyssey login station when
on-foot in concourse.

Also, EDSM was defaulting wrongly for this.station_marketid.  Not that
the plugin even *uses* that at this time.
2021-05-12 10:56:43 +01:00
Athanasius
844e6115e3 Also handle Embark (properly) in EDSM and Inara plugins. 2021-05-01 13:50:45 +01:00
Athanasius
bc6557dd9c Quieten various TRACE log output.
* A lot of this is commented out.  It might be useful in the future, but
  is just too noisy for now.
* Changed the protocol webserver to info, as it is.
* Left the EDSM 'not 1XX, 2XX or 5XX' in as it's a warning, so 'pass's
  on the conditional bodies that would be empty now trace's are
  commented.
2021-04-12 08:31:47 +01:00
Athanasius
5edf8d5b59 Change monitor.state['on_foot'] to 'OnFoot' for consistency 2021-04-12 08:30:51 +01:00
Athanasius
bd4489974d EDSM plugin now maintaining Station Name when on_foot 2021-04-12 08:30:51 +01:00
Athanasius
d585dd9233 Also str() appversion in EDSM and Inara plugins 2021-04-01 14:46:43 +01:00
Athanasius
2f9789afdd Update all code to use config.appversion() as a function
This *also* caught some instances where appversion_nobuild should
already have been used, so those were both changed and updated to a
function call.
2021-04-01 14:45:52 +01:00
Athanasius
6aa4ccaf90 plugins/edsm: Don't try to r.close(), that's not even valid 2021-04-01 14:45:50 +01:00
Athanasius
3d3674da5f plugins/edsm: Call requests.Session.close() after we've shutdown worker thread
This properly closes any sockets and avoids a -W default warning on
shutdown.
2021-04-01 14:45:50 +01:00
Athanasius
745c2ce8d2 edsm: Ensure Request handles are closed. 2021-04-01 14:45:50 +01:00
Athanasius
db48b6eaad plugins/edsm: Avoid Tk event_generate() calls during shutdown
# Conflicts:
#	plugins/edsm.py
2021-04-01 14:45:48 +01:00
A_D
b5a8c03980 Added missing whitespace 2021-04-01 14:45:48 +01:00
A_D
b694bdc965 Added per-event killswitch 2021-04-01 14:45:48 +01:00
A_D
6374fbbeb8 Added event disabling
You can now disable specific event handlers in plugins
2021-04-01 14:45:47 +01:00
A_D
70087a27e4 Added total journal cutoff killswitches 2021-04-01 14:45:47 +01:00
A_D
8dca6783fc Fixed spelling, added utility methods 2021-04-01 14:45:47 +01:00
A_D
d5b62d957b Added support for comments in kill switches 2021-04-01 14:45:47 +01:00
A_D
10ca50bf5a Moved edsm killswitch check
It was causing exit hangs when edsm was disabled
2021-04-01 14:45:47 +01:00
A_D
2d127ae3d0 Added docs, fixed incorrect kill switch names 2021-04-01 14:45:47 +01:00
A_D
d81093760e Added hooks into killswitches in plugins 2021-04-01 14:45:47 +01:00
A_D
87df8d8ab8 suppressed exceptions in migration code 2021-04-01 14:45:46 +01:00
A_D
278480b99f replaced ors with defaults in config usage 2021-04-01 14:45:46 +01:00
Athanasius
25852997c5 Updated all source to use new config methods
# Conflicts:
#	monitor.py
2021-04-01 14:45:46 +01:00
Athanasius
bd670b7ff1 Updated plugins to expect that CAPI data is safe
# Conflicts:
#	plugins/eddn.py
2021-04-01 14:45:45 +01:00
Athanasius
8aac704fa1 plugins/edsm: start/stop detailed logging. 2021-04-01 14:45:44 +01:00
Athanasius
462cd25312 config: Make config.shutting_down() a property, and change 'callers' 2021-01-11 16:54:09 +00:00
Athanasius
bca0231dfc plugins/edsm: Avoid Tk event_generate() calls during shutdown 2021-01-11 16:45:26 +00:00
Athanasius
3d3baaea8e EDSM: Finer-grained and more detailed logging of API results 2020-10-01 11:47:31 +01:00
Athanasius
a4b334dcfb EDSM: When we API call a Location event, log all events in that call. 2020-09-28 15:34:39 +01:00
Athanasius
1aba1a0596 Trace: Change several calls from debug to trace. 2020-09-23 22:07:18 +01:00
Athanasius
85d45aadd7 Place detailed logging for "Location" events.
To try and track down what's happening with #713
2020-09-23 11:45:48 +01:00
Athanasius
a3b69fd94d Switch internal plugins to EDMCLogging.get_main_logger() 2020-09-22 16:20:05 +01:00
A_D
c02b292f50
Removed uneeded list comps 2020-09-22 14:51:45 +02:00
A_D
f8523e0a9f
removed parens around tuple unpack 2020-09-22 14:49:24 +02:00
A_D
e930911415
remove double assign 2020-09-22 14:49:23 +02:00