James Muscat
ddd81574ed
Allow configuration of gateway HTTP port rather than hardcoding.
2015-04-14 16:38:56 +01:00
James Muscat
46292e3c30
Don't corrupt the commandline unless we're asked to.
...
The hacky approach caused problems with anything else trying to use
argparse (e.g. nosetests). This approach only tries to parse the
commandline if we need to e.g. within Relay/Gateway's main() function.
2015-04-14 14:30:26 +01:00
James Muscat
43ff4cda3a
Move version number out of init file to its own file (consistent with
...
other projects).
2015-04-14 13:58:33 +01:00
James Muscat
1f3de2474c
First pass at getting test framework up and running.
2015-04-14 13:36:23 +01:00
James Muscat
ec3987ad17
Correctly figure out enough of Python's internals for this to work.
2015-04-14 01:03:07 +01:00
James Muscat
d71469c10f
This is slightly horrid, but parse the commandline in Settings to
...
determine if we need to override our configuration.
2015-04-14 00:55:31 +01:00
James Muscat
f178fec08d
Allow overriding settings with config file.
2015-04-14 00:37:11 +01:00
James Muscat
da426c1d89
Encapsulate settings as a class. Make a singleton available.
2015-04-14 00:30:22 +01:00
James Muscat
074f24bc52
Whoops, accidentally changed this.
2015-04-13 18:33:19 +01:00
James Muscat
7d7f977cea
Rip out the old method of collecting stats in favour of the generic way.
2015-04-13 18:32:32 +01:00
James Muscat
384a4f40fe
...except that tally should require the lock.
2015-04-13 18:28:50 +01:00
James Muscat
4bab5e3606
Let the StatsCollector collect arbitrary stats.
2015-04-13 18:28:04 +01:00
James Muscat
bd0afbc0c8
Actually count the right numbers, in the right order, and limit range
...
properly.
2015-04-13 18:14:39 +01:00
James Muscat
7c146a14c4
Factor out common code into StatsCollector.
2015-04-13 18:04:33 +01:00
James Muscat
95e83333d7
Add a StatsCollector to the Relay too.
2015-04-13 18:00:24 +01:00
James Muscat
fce10cdaa6
Simple stat collector, to better monitor gateway throughput and health.
2015-04-09 00:35:27 +01:00
James Muscat
5d3551d705
These were just prototypes; no need to keep them around.
2015-04-04 01:10:45 +01:00
James Muscat
639703f8c9
Avoid deprecated access to BaseException.message.
2015-04-04 01:02:18 +01:00
James Muscat
ad3684d532
Add init script for eddn-gateway.
2015-04-04 00:52:02 +01:00
James Muscat
a0337cccdf
Bump version number.
2015-04-04 00:45:33 +01:00
James Muscat
c2109d2866
pep8 fix.
2015-04-04 00:38:11 +01:00
James Muscat
1c72ff0e76
Also generate relay script.
2015-04-04 00:37:18 +01:00
James Muscat
4f4ee10a98
Kill off dead code.
2015-04-04 00:33:56 +01:00
James Muscat
608ff49723
Build an egg, and create an eddn-gateway script.
...
Currently can only be run from a directory where ../schemas exists
and is populated...
2015-04-04 00:31:17 +01:00
James Muscat
2bddaec99b
Expose version in settings.
2015-04-04 00:13:59 +01:00
James Muscat
c4f9d7df27
pep8 fix.
2015-04-04 00:06:25 +01:00
James Muscat
a20da1d04e
Default to listening on all network interfaces.
2015-04-04 00:00:23 +01:00
James Muscat
e8a2e8dc63
Always use UTC for the GatewayTimestamp.
2015-01-12 13:15:20 +00:00
James Muscat
960179f073
Be honest about the existence of the gatewayTimestamp property.
2014-12-18 16:55:48 +00:00
James Muscat
3336105f54
buyPrice can be null (e.g. station has no stock to sell you); in those
...
situations it makes sense to omit it.
2014-12-18 15:01:06 +00:00
James Muscat
cee1900e88
By popular request, add optional supply/demand properties; clarify what
...
the sell and buy prices are; give timestamp a format restriction.
2014-12-18 14:47:36 +00:00
James Muscat
2074e3435f
Client should connect to relay not gateway.
2014-12-18 13:04:52 +00:00
James Muscat
ddeca9f00c
Add uploader key to header section if we have a salt.
2014-12-18 13:04:15 +00:00
James Muscat
1b71ceda27
Didn't mean to commit that test value...
2014-12-18 13:03:54 +00:00
James Muscat
3e3a13caaa
Allow a test message with the same validation as a 'real' commodity
...
message.
2014-12-18 13:03:11 +00:00
James Muscat
d4e51775d3
Typo
2014-12-17 19:52:25 +00:00
James Muscat
56853854ca
Add a gateway timestamp to the message (e.g. time of receipt by EDDN,
...
not time of generation of market data).
2014-12-17 19:50:37 +00:00
James Muscat
8845cdca80
Allow other, undefined properties in the schema; don't require any of
...
the header properties (but do require the header).
2014-12-17 19:50:06 +00:00
James Muscat
7f84091f51
Initialise to empty list of validation results when we create a results
...
object.
2014-12-17 18:24:06 +00:00
James Muscat
66bfe98c14
Validate against draft Commodity schema.
2014-12-17 14:18:58 +00:00
James Muscat
cceb77d7a1
We don't actually want to return the original JSON.
2014-12-17 14:11:24 +00:00
James Muscat
a7925923cf
Configure Validator with our schema (don't do the validation yet).
2014-12-17 14:06:53 +00:00
James Muscat
7786d41d67
Add http:/example.com as an allow-all JSON schema.
2014-12-17 13:48:55 +00:00
James Muscat
8badcc38e5
Barf on unknown schemas (without a way to make them known, currently).
2014-12-17 13:47:36 +00:00
James Muscat
351b00aed2
Return HTTP 400 rather than 200 on error.
2014-12-17 13:40:41 +00:00
James Muscat
fdeea2f7c2
Make Validator its own class, because it's going to want state soon.
2014-12-17 13:38:06 +00:00
James Muscat
2d406f9e25
Create a framework for JSON validation at the gateway.
2014-12-17 13:30:09 +00:00
James Muscat
43a9931e38
Mercilessly crib EMDR's wsgi app for the Gateway. Currently just passes
...
any valid JSON through.
2014-11-16 12:48:48 +00:00
James Muscat
a1f1019784
Let's pretend this works...
2014-11-16 11:45:34 +00:00
James Muscat
a70cfebec9
This should in fact be localhost (or whatever the gateway/announcer
...
is)...
2014-11-16 11:44:43 +00:00